Triple Whale

Need help with something?

Talk to data expert

 

The Triple Whale connector allows you to ingest data from your Triple Whale account into your data warehouse via Daton. Data can be replicated into BigQuery, Snowflake, or Redshift for marketing attribution, ad-spend and blended-ROAS reporting, and custom e-commerce analytics.

Note: Triple Whale is a non-standard (custom-query) connector. Unlike a typical connector with a fixed catalog of tables and columns, Triple Whale has no predefined schema. You supply your own SQL queries against Triple Whale's data model, and the connector creates one table per query. The columns are generated dynamically in the warehouse from the query output, so the schema is entirely determined by the queries you write.


About Triple Whale

Triple Whale is an e-commerce analytics and marketing-attribution platform for direct-to-consumer brands. It consolidates ad-platform spend, Shopify orders, and pixel-based attribution into a single data model that you can query with SQL through its Moby / Orcabase SQL API.

This connector runs the SQL queries you provide against Triple Whale's SQL endpoint, one day at a time, and lands the results in your warehouse. Because you author the queries, you control exactly which metrics and dimensions are replicated.


Prerequisites

Before configuring the connector, ensure you have:

  • An active Triple Whale account with API access.
  • A Triple Whale API Key (see How to Obtain Your Credentials below).
  • Your Shop ID — the shop domain the data belongs to (e.g., example.myshopify.com).
  • One or more SQL queries you want to replicate, each written against Triple Whale's SQL model and each containing the @startDate and @endDate parameters (see Writing Your Queries).

How to Obtain Your Credentials

Generate the API Key.

  • Log in to your Triple Whale account.
  • Go to Settings → API Keys (the developer/API section of your account).
  • Create a new API key and copy the value.

Identify your Shop ID.

  • Your Shop ID is the shop domain associated with the account — typically your Shopify domain, e.g., example.myshopify.com.

Steps to Integrate

Follow these steps to configure the connector in Daton:

  1. In Daton, navigate to Add Integration → Triple Whale.
  2. Begin Setup – Enter Source Configuration Details.
  3. Integration Name: provide a descriptive name.
  4. Description (optional): e.g., "Triple Whale – blended ad spend & ROAS".
  5. Replication Frequency: select how often to pull data. Daily is sufficient for most reporting; use a shorter interval for near-real-time needs.
  6. Replication Start Date: choose the earliest date from which the connector will begin the historical extraction. The connector backfills from this date up to today, one day per partition.
  7. Click Authenticate.
  8. Enter Authentication and Table Credentials:
    • Shop ID: enter your shop domain (e.g., example.myshopify.com).
    • Triple Whale API Key: paste the API key generated above.
    • Query 1: enter your first SQL query (required). See Writing Your Queries below.
    • Query 2–5 (optional): enter up to four additional queries. Each query becomes its own table.
  9. Click Authenticate – Daton validates the credentials against the Triple Whale API.
  10. Select the tables to replicate: the queries you entered appear as Query_1 … Query_5. Select the ones you want to load.
  11. Configure Schema / Columns: in Triple Whale the columns are created dynamically in the warehouse from each query's output, so there is no fixed column list to pick from here. Confirm and continue.
  12. Click Submit and connect your warehouse. Daton begins the initial historical load and then schedules incremental loads at the selected frequency.

Writing Your Queries

Every query must include @startDate and @endDate

The connector processes data one day at a time. For each day in the replication window it calls the API with that day's date, and the API substitutes it into your query wherever you have placed the @startDate and @endDate parameters. This is a hard API requirement — a query without both @startDate and @endDate will not replicate correctly.

Put the parameters in your date filter. For example:

SELECT SUM(spend) AS spend, channel
FROM ads_table a
WHERE event_date BETWEEN @startDate AND @endDate
GROUP BY channel

For a single-day partition the connector passes the same date to both parameters, so BETWEEN @startDate AND @endDate resolves to that one day.

Each query output must not exceed 10 MiB

Every API response — i.e., the result of one query for one day — cannot exceed 10 MiB. This is an API-side limit. Because the connector already partitions by day, this rarely becomes an issue, but if a single day's result is very large (highly granular, high-cardinality dimensions), keep the response small by:

  • Selecting only the columns you need instead of SELECT *.
  • Reducing dimension cardinality, or splitting one broad query across several narrower query slots (Query_1 … Query_5).

One query = one table

Each query you provide is a separate table in the warehouse, named Query_1 through Query_5. There is no fixed schema — whatever columns your query returns become the columns of that table, auto-detected on load. New columns you add to a query later are picked up automatically on the next sync.

Mandatory columns added to every table

Regardless of what your query returns, the connector adds these columns to each table:

Column Data Type Description
date DATE The partition date the row was pulled for. Primary key.
input_query STRING The exact SQL query string that produced the row, stored for lineage/auditing.

All other columns come directly from your query's SELECT list and are typed automatically by the connector.


Replication & Sync Behavior

  • Partitioning: the replication window is broken into 1-day partitions and processed newest-first (reverse), so recent data lands early in a backfill.
  • Lookback: the connector re-processes a trailing window of recent days on each run so late-arriving or restated data is re-captured.
  • Pagination: none — each daily query returns a single response (which must stay within the 10 MiB limit).