The sandbox lets you test queries on synthetic data before running them on real data. Sandbox queries run faster and aren't subject to Ads Data Hub's privacy restrictions. Using the sandbox, you can:
- Test queries before running them on your own data.
- Iterate on draft queries before finalizing them.
- Explore data within Ads Data Hub.
Sandbox privacy restrictions
The sandbox is the only place in Ads Data hub where you can:
- Run queries using
SELECT *. This allows you to see what kind of data your queries will contain in production.
- Run a series of similar queries without compromising data granularity. Doing this would typically result in dropped rows. To mitigate against dropped rows in production, use a row merge configuration.
Writing and running sandbox queries
Writing and running queries using the sandbox is almost identical to using ADH in a real-world setting. The key differences are that you must select the sandbox role when running your query, and you may see privacy warnings that don't apply to your query.
Write a sandbox query
- Navigate to the My Queries tab.
- Click +Create New Query.
- Give your query a name.
- Write BigQuery compatible SQL arguments. The query validator will turn red if your query violates our privacy checks, but you can still run it via the sandbox. For explanation, read The query validator is red below.
- Optionally, give your query parameters.
- Optionally, add a merge column to see dropped results.
- Click Save.
The query validator is red
The query validator may turn red after you've written your sandbox query. This could be due to:
- A violation of privacy checks: Even though your query violates privacy checks and can't be run on real user data, it can be run using the sandbox.
- Invalid SQL: If the SQL you've written isn't semantically correct, it can't be run in Ads Data Hub.
Run a sandbox query
- Navigate to the My Jobs tab.
- Select the query type.
- Select the query to run.
- Select ADH Sandbox Customer from the Ads data from dropdown.
- Select the table where your query results should be saved.
- Enter start and end dates between 2018-08-18 00:00:00 and 2018-09-17 23:59:59.
- Click Start.