> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcemedium.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Triple Whale - Integration Instructions

> Export Triple Whale measurement into BigQuery with Triple Whale Data Warehouse Export. Self-serve on a dedicated BigQuery project; request setup on a shared one.

<Note>Raw data only. Triple Whale lands as warehouse tables. It is not modeled in dashboards or Uni yet, and it does not replace the Triple Whale app.</Note>

Triple Whale is a measurement platform. SourceMedium uses Triple Whale **Data Warehouse Export** to BigQuery: Triple Whale runs SQL you define and writes the result into a dataset in your warehouse.

This is a push into BigQuery, not a Triple Whale API pull and not an ad-account OAuth connect. Triple Whale also supports Snowflake, S3, and GCS; SourceMedium's path is **BigQuery**.

**Who can self-serve:** **Pro**, which delivers a dedicated BigQuery project you administer. On **Foundation**, the shared project, you cannot grant dataset access, so use **Request integration** in Connect and SourceMedium picks it up. See [Foundation and Pro](/docs/data-activation/managed-data-warehouse/overview#foundation-and-pro).

## Vendor documentation

| What                                                | Triple Whale doc                                                                                                             |
| --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| How Data Warehouse Export works                     | [Introduction to Data Warehouse Export](https://triplewhale.readme.io/reference/introduction-to-data-warehouse-export)       |
| BigQuery project, dataset, and permissions          | [BigQuery Setup and Configuration](https://triplewhale.readme.io/reference/bigquery-setup-and-configuration)                 |
| In-app walkthrough (Integrations → BigQuery)        | [BigQuery Integration](https://kb.triplewhale.com/en/articles/10072991-bigquery-integration)                                 |
| Append behavior and de-duplication                  | [De-duplication for Data Warehouse Export](https://triplewhale.readme.io/reference/de-duplication-for-data-warehouse-export) |
| Tables you can query in the export SQL              | [Triple Whale Data Ontology](https://triplewhale.readme.io/docs/triple-whale-data-ontology)                                  |
| Channel-reported ads (not Triple Whale attribution) | [Ads table](https://triplewhale.readme.io/docs/ads-table) (`ads_table`)                                                      |
| Triple Whale-attributed results                     | [Pixel Joined table](https://triplewhale.readme.io/docs/pixel-joined-table) (`pixel_joined_tvf`)                             |

The in-app destination is **[Data Warehouse Export](https://app.triplewhale.com/data-warehouse)**. The knowledge-base article starts from **Data → [Integrations](https://app.triplewhale.com/integrations)** and connects BigQuery there. Both end at the same BigQuery destination.

## Foundation: request integration

Foundation delivers a shared project, so you do not have project-level BigQuery access and cannot grant Triple Whale's exporter on a dataset yourself.

1. In SourceMedium, open **Connect a data source** and find **Triple Whale**.
2. Click **Request integration**.
3. SourceMedium is notified. The card shows **Setting up** until the team completes it.

Do not email a separate thread unless we ask.

## Pro: self-serve BigQuery export

Pro delivers a dedicated BigQuery project you administer. You grant Triple Whale write access on a dataset in it. Connect shows the project ID.

### What you need

* An active Triple Whale account with Data Warehouse Export
* Access to your dedicated BigQuery project (Connect shows the project ID)

### How to connect

<Steps>
  <Step title="Create an isolated dataset">
    In your dedicated BigQuery project, create a dataset for this export (for example `triple_whale_export`). Triple Whale recommends an isolated dataset so the exporter cannot write elsewhere.
  </Step>

  <Step title="Grant Triple Whale write access on that dataset">
    Open the dataset → **Share → Manage Permissions → Add principal**. Add `srv-big-query-exporter@shofifi.iam.gserviceaccount.com` with **BigQuery Data Editor**. Grant it on the **dataset**, not the whole project. Triple Whale's [BigQuery setup](https://triplewhale.readme.io/reference/bigquery-setup-and-configuration) is the vendor procedure.
  </Step>

  <Step title="Connect BigQuery in Triple Whale">
    Open **[Data Warehouse Export](https://app.triplewhale.com/data-warehouse)** (or **Data → Integrations → BigQuery**), click **Connect** on BigQuery, enter the project ID and dataset ID, check the box confirming the service account was added, and save.
  </Step>

  <Step title="Create a scheduled export">
    Click **New Export**, pick the BigQuery destination, set a **New Table ID** (Triple Whale creates the table), and write SQL that selects the columns you need. Do not use `SELECT *`. Triple Whale's schema is dynamic and wildcard selects break as fields change.

    For measurement next to platform ROAS, start from Triple Whale-attributed tables such as [`pixel_joined_tvf`](https://triplewhale.readme.io/docs/pixel-joined-table), not [`ads_table`](https://triplewhale.readme.io/docs/ads-table) (channel-reported). Include `event_date` when the table requires it.

    Choose **Export Now** or a recurring schedule (hourly, daily, or weekly). Each run **appends** rows. Triple Whale does not de-duplicate. Add an `exported_at` timestamp in the SQL and de-duplicate in BigQuery using their [de-duplication guide](https://triplewhale.readme.io/reference/de-duplication-for-data-warehouse-export).
  </Step>

  <Step title="Confirm in SourceMedium">
    Click **Connect** on Triple Whale in SourceMedium so we can mark the source as in setup and confirm tables are arriving. If the SQL schema later changes, create a **new table**. Triple Whale does not alter an existing export table's schema.
  </Step>
</Steps>

## What data syncs

The tables Triple Whale creates from the export SQL you configure. Grain and columns are those of that query. First release is those warehouse tables only.

History can be backfilled by running the same export SQL in date batches (for example month by month).

### Notes

* This is Triple Whale **Data Warehouse Export to BigQuery**, not the [Custom SQL API](https://triplewhale.readme.io/reference/data-out-execute-custom-sql-query) (that is a pull).
* Exports append. Querying the raw table without de-duplication inflates totals.
* First release is tables you query, not a dashboard replacement.
