You can use the web UI in Ads Data Hub to do many of the same tasks as you would using the API. This guide shows how to create a report and then run it. To get the most out of this tutorial, be sure you have linked at least one advertising account before beginning. To learn how to link your advertising accounts, see Link accounts to Ads Data Hub.
Write your own SQL
- In Ads Data Hub, open the Reports page.
- Click + Create report.
- Click SQL to open a blank report.
Copy the following SQL, and then paste it into the report editor. You can substitute
cm_dt_impressions
with a table from your linked ads data. For example, if you have linked a Google Ads account, replacecm_dt_impressions
withgoogle_ads_impressions
.SELECT COUNT(*) AS impressions FROM adh.cm_dt_impressions;
Note that your report has not been saved at this point. You'll save it after testing in the next stage.
Test your SQL using the sandbox
You should test your SQL using the sandbox role before running it on production data. This can help you find problems faster.
- Click Run while in the SQL editor view. The New job pane opens. Note: The New job pane is available when the SQL editor is open, and is useful for testing and iterating on your report before committing changes. Jobs run from this pane don't contribute to the execution history of your saved report.
- Select ADH Sandbox Customer from the Ads data from drop-down.
- Choose the BigQuery project, dataset, and table where your report results should be saved.
- The date range will be automatically updated to "Aug 17 - Sep 18, 2018" to match the contents of our sandbox data.
- Click Run. Job status and details will be displayed below the SQL editor.
After the job finishes running, open the results in BigQuery. You should see a table that looks something like this:
Row impressions 1 388204742 Click Done to leave the SQL editor once you're satisfied with the results of your test report. You're ready to run it on real data.
Run your SQL query using your linked data
After testing your SQL using the sandbox role, you're ready to run it on real data.
- Enter a name for the report.
- Configure the input and output for jobs run on this report:
- Select a data source in the Ads data from field. This should be the Ads Data Hub account ID associated with the ads data you want to query.
- Select a date range and time zone for the report. The report time zone should match the time zone of the linked ads account, such as a Google Ads account.
- Under Privacy noise settings, we recommend to set the toggle to the Use noise position. Learn more about privacy modes.
- Leave the filtered row summary in automatic mode.
- Choose the BigQuery project, dataset, and table where your report results should be saved.
- Click Save.
- Click Run.
To learn more about advanced features of creating reports, such as parameters and schedules, see the detailed documentation in Create and run reports.