This page describes error messages you might encounter when querying data with Ads Data Hub,
and provides troubleshooting guidance.

Error messages can be found in the following locations:  

- While editing a query in the Ads Data Hub UI, error messages will appear in the validation box above the query text. You can expand the error text by clicking on **Show
  validation** .  
- After running a query that fails to complete, the Details field specific to the job will contain an error message in the Error field. A list of your recent jobs can be found by clicking on **Jobs** in the Ads Data Hub UI.  
- You can retrieve error messages using the Ads Data Hub API, using the `
  https://developers.google.com/ads-data-hub/reference/rest/v1/operations` resource.

This table does not include all possible error messages. If you don't see the relevant error
here, or the suggested steps don't resolve the issue, [contact
support](https://developers.google.com/ads-data-hub/support/contact-support).

|---|---|---|
| Error message | Description | Troubleshooting |
| Resources exceeded during query execution: The query couldn't be executed in the allotted memory. | This error is returned when your query requires too much memory to execute. | - Avoid [reaggregation](https://developers.google.com/ads-data-hub/guides/best-practices#avoid_reaggregation). - Use a smaller data date range. - Break up your query into multiple, smaller queries. Then, combine the outputs in BigQuery. Alternatively, try using temporary tables to split the query up. - Ensure that the larger table is on the left side of any `JOIN`. - Review Ads Data Hub's [best practices](https://developers.google.com/ads-data-hub/guides/best-practices#performance). - Review additional troubleshooting in the BigQuery [error messages article](https://cloud.google.com/bigquery/docs/error-messages). |
| BigQuery error. Error code: Internal | This error is returned for various reasons. Common causes of this error include: |   |
| BigQuery error. Error code: Internal | - A temporary issue or a timeout | - Try running your query again. |
| BigQuery error. Error code: Internal | - When using `OFFSET()` or `ORDINAL()`, if the index is out of range | - Remove `OFFSET()` or `ORDINAL()`, or rewrite, using `SAFE_OFFSET()` or `SAFE_ORDINAL()` instead. ([ref](https://cloud.google.com/bigquery/docs/reference/standard-sql/arrays#accessing_array_elements).) |
| BigQuery error. Error code: Internal | - When there is a data overflow caused by re-aggregations. | - Avoid re-aggregation in query. - Avoid joining unaggregated to aggregated and then aggregating once more. |
| BigQuery error. Error code: Internal | - When the result has an array which contains a `NULL` element | - Review BigQuery [rules](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#array_nulls) concerning `NULL` elements in arrays. |
| BigQuery error. Error code: Internal | *If none of the these scenarios apply to your query, reach out to [Ads Data Hub Support](https://developers.google.com/ads-data-hub/support/contact-support) to diagnose the error.* ||
| Not found: Dataset `<myproject:mydataset>` was not found in location `<regioncode>`. | This error is returned when you attempt to output query results to a BigQuery dataset that is not in the same [region](https://cloud.google.com/bigquery/docs/locations) as your Ads Data Hub instance. | - Re-execute the job, pointing to a dataset that is in the same region as your Ads Data Hub instance. - [Copy](https://cloud.google.com/bigquery/docs/copying-datasets) or [recreate](https://cloud.google.com/bigquery/docs/managing-datasets#moving_datasets) the data in a dataset that is in the same region as your Ads Data Hub instance. - Specify a dataset location that matches your Ads Data Hub account region. See [Create a BigQuery dataset](https://developers.google.com/ads-data-hub/guides/account-setup#create_a_bigquery_dataset) for details on dataset location requirements and supported regions. |
| Not found: Dataset `<myproject:mydataset>` was not found in location `<regioncode>`. | *Ads Data Hub Support cannot modify or change the region assigned to your Ads Data Hub instance*. ||
| Table cannot be accessed in BigQuery. | This error returns during results preview, if you don't have access to the output table in BigQuery. | - Have someone in your organization with the proper credentials in BigQuery grant you permission to view the table. - Re-execute the query, specifying an output table for which you have permission to view in BigQuery. |
| Your query didn't pass Ads Data Hub privacy checks. Make sure your query meets aggregation requirements and difference checks. Error code: 0400 | This error returns when query results are insufficiently aggregated or they are too similar to previous results. | - Ensure that each result row meets the minimum required user count (50 users in most cases; 10 users when only clicks and conversions are accessed). - Use sandbox data when testing queries. - Review Ads Data Hub's [best practices](https://developers.google.com/ads-data-hub/guides/privacy-checks). |
| System error. Please contact support. Error code: Internal | This error is returned for various reasons. Common causes of this error include: |   |
| System error. Please contact support. Error code: Internal | - Querying a first-party table that is not in same region as your Ads Data Hub instance | - Copy first-party data to a dataset that is in the same region as your Ads Data Hub instance. |
| System error. Please contact support. Error code: Internal | - Timestamp overflow | - Use `TIMESTAMP_MICROS()` to convert time fields (e.g., `query_id.time_usec`) from microseconds to a timestamp. |
| System error. Please contact support. Error code: Internal | - Querying data hosted in Google Drive storage | - Host the data in Google Cloud storage. |
| System error. Please contact support. Error code: Internal | - Billing has not been enabled for the project | - Add a billing account for the project in Google Cloud Console. ([Learn more](https://console.cloud.google.com/billing).) Should you have any questions about that task contact the [BigQuery support team](https://cloud.google.com/support-hub) or see this [BigQuery Help Center article](https://cloud.google.com/bigquery/docs/billing-questions) for more assistance with billing issues. |
| System error. Please contact support. Error code: Internal | *If none of the these scenarios apply to your query, reach out to [Ads Data Hub Support](https://developers.google.com/ads-data-hub/support/contact-support) to diagnose the error.* ||
| The query contains `<number>` user sets, which exceeds the 100000 limit | This error is returned when the query results would contain more than the limit of 100,000 user sets. A user set is the most basic unit of protection in Ads Data Hub. A query gets one user set each time it retrieves data from a user-level Ads Data Hub table. | - Reduce the complexity of the query. - Reduce the number of `JOIN`s in the query, particularly for user-level Ads Data Hub tables. - Try querying over a shorter date range. - Break up the query into multiple, smaller queries. |
| Reminder: Queries that use 1PD tables require that you update your consent settings. | This error is returned when a query references first-party data (1PD) tables, if you have not acknowledged that you have obtained user consent. | - Obtain and acknowledge [user consent](https://developers.google.com/ads-data-hub/resources/consent-requirements#consent-ack). - Remove the references to the first-party data tables. |
| Tables from separate Google services must not be combined. Aggregate each Google service individually and combine after | This error is returned when a query combines data from different Google services, such as using a disallowed combination of policy-isolated tables. | Separate each Google service into a single result, either by - Limitng each query to a single Google service - Using `CREATE TABLE` statements with `OPTIONS(privacy_checked_export=true)`. |
| Setup failed. We've encountered issues setting up your account for UPDM. Please contact support via the buton below. | You might encounter this error if [Domain Restricted Sharing (DRS)](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-domains) is enabled on your Google Cloud project. | Temporarily disable DRS on your Google Cloud project to complete UPDM setup. Once setup is complete, you can re-enable DRS. If you cannot disable DRS due to organizational policies, [reach out to our support team](https://developers.google.com/ads-data-hub/support/contact-support) for assistance. |