If you have custom needs for your data transfers’ schemas, you can create custom schemas to use across your data warehouse transfers. You can also use custom schemas to save and repurpose query setups in the Query Manager when transferring data with the Supermetrics API.
Custom schemas are data source-specific. A schema created for one data source will not be displayed when creating transfers for other data sources.
- Log in to the Supermetrics Hub.
- In the left-hand menu, under Transform, click Query Manager (API).
- Select for Data Warehousing from the dropdown menu next to the page title.
- Select the data source you want to create the schema for.
- Open the Query tab.
- Select the metrics and dimensions to use for your query.
- You can use queries from pre-built schemas as a template. In the Schemas tab, click a query under any default schema — this will take you back to the Query tab and fill the selected query into the configuration, where you can continue to modify it.
- Set Select dates as a 1-day range, preferably yesterday. A single account should be sufficient for your data preview.
- Include the Date dimension in your query to load your data incrementally, day by day. If the date isn't included, we'll snapshot all available history, overwriting each day.
- Click Run to validate the query.
- Click Save as to save the query and add it to a schema.
- Give a name for the query. Give a name for your new schema (or if you have already created schemas, select a schema from the dropdown menu).
- Click OK.
- You can add multiple queries to one schema by repeating steps 5-9. Each query corresponds to one table or file type in your data destination.
When you’re ready with your custom schema, you can use it in your data transfers to BigQuery and other data warehouse and cloud storage destinations. To repurpose the saved query setup in the Query Manager, access it in the Schemas tab.