Run custom SQL queries for structured data retrieval. The response returns the query results in a JSON format.
Running your Query in SQL BuilderIf you wish to run your query using the SQL Builder interface rather than via API (e.g. for testing or data exploration), replace
@startDateand@endDate(camelCase) with@start_dateand@end_date(snake_case) in the SQL expression.
Matching Dashboard ResultsMatching SQL text alone does not guarantee that an API request returns the same results as a dashboard. A dashboard can apply saved settings that are not included when you copy its SQL, such as the attribution model, the attribution window, and whether purchases are reported by click date or purchase date.
To compare results, match those settings along with the dates and filters. For queries on the Pixel Joined table, these settings correspond to
model,attribution_window, anduse_click_date. If a query does not set them, Pixel Joined uses the Triple Attribution model, the Lifetime attribution window, and the purchase date.If results still differ, contact Triple Whale Support with the SQL query, the dashboard settings, the API request with API keys and other credentials removed, and both results.
Best Practices
Select Specific ColumnsAvoid using
SELECT *in your queries. Our schema is dynamic, and using wildcard selection can lead to broken or inconsistent results as fields change. Always specify the exact columns you need.
Rate LimitsThe API enforces two rate limits:
- 100 requests per second
- 600 requests per minute
If you exceed these quotas, the API will return a 429 Too Many Requests error.
Compare with Data Warehouse ExportUse Data Warehouse Export instead if you want to push data directly to BigQuery, Snowflake, AWS S3, or GCS.