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 Team Site.
- In the left-hand menu, click Query manager (API).
- Select the data source you want to create the schema for. Open the Schemas tab.
- Click + New schema.
- Select a name for your new custom schema and click Ok.
- Open to the Query tab (next to the Schema tab) and create a query for the schema.
- You can use queries from pre-built schemas as a template. In the Schemas tab, click on 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.
- Include the Date dimension in your query to split your data day by day.
- Ensure that the DWH tab is checked along the top bar. This ensures that your query, when saved, is made available in data warehouse and data lake transfers.
- Click Run to validate the query.
- Click Save as to save the query. Select a name for the query and set it to your newly created custom schema.
- You can add multiple queries to one schema by repeating steps 6-9. Each query corresponds to one table 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.