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

# Connect BigQuery to Dash Social

> Set up Dash Social's BigQuery integration to export daily social metrics into your data warehouse.

<Note>
  If organic metrics (e.g. AVG\_REACH, VIDEO\_VIEWS) appear as NULL in your Facebook table, this is likely because your Meta Ads account is not connected to Dash Social. See [Connecting Your Meta Ads Account to Dash Social](https://help.dashsocial.com/hc/en-us/articles/4408951687181-Connecting-Your-Meta-Ads-Account-to-Dash-Social) for more details.
</Note>

# Overview

This guide shows you how to connect Dash Social to BigQuery so your social metrics are stored and updated in your own data warehouse. From there, you can query the data directly or connect tools like Looker or Power BI to build custom dashboards and reports without needing to move the data elsewhere.

The integration runs automatically every day at **6 AM ET**, ensuring your data stays fresh and ready for reporting.

***

# Use Case Examples

* Monitor Instagram reach in a custom Looker dashboard
* Feed Facebook ad performance data into a weekly Power BI report
* Run SQL queries on TikTok video engagement trends

***

# Before You Start

Make sure you have:

* Access to a Google Cloud project with BigQuery enabled
* Permissions to create datasets and tables
* Your Dash Social account ready to connect

## Supported Channels

Dash Social currently supports BigQuery exports for the following platforms:

* **Instagram Feed**
* **Instagram Stories**
* **TikTok**
* **Facebook**

Each channel requires a dedicated table with the correct schema. You can choose which channels to enable based on your reporting needs.

***

# Implementation

## Set Up BigQuery

### Step 1: Create a Project and Dataset

1. Use your existing GCP project or create a new one (e.g. `marketing-data-prod`).
2. Inside BigQuery, create a new dataset (e.g. `social_analytics`).
   * We recommend creating a dedicated dataset for Dash Social to keep things clean and organized.

### Step 2: Create Tables for Each Channel

You'll need a separate table for each social channel you want to track (e.g. Facebook, TikTok, Instagram).

1. In your dataset, create one **empty table** per channel.
2. Find all schema here:
   * [Instagram Feed Schema](/guides/integration/connect-bigquery-to-dash-social/instagram-feed-schema)
   * [Instagram Stories Schema](/guides/integration/connect-bigquery-to-dash-social/instagram-stories-schema)
   * [TikTok Schema](/guides/integration/connect-bigquery-to-dash-social/bigquery-tiktok-schema)
   * [Facebook Schema](/guides/integration/connect-bigquery-to-dash-social/bigquery-facebook-schema)
3. Define the schema for the table:

   * Manually via the BigQuery console, or
   * Using the [BigQuery API Explorer](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/insert)
   * Use the BigQuery CLI

     If you're comfortable with the command line, you can use the BigQuery CLI to create tables quickly from a local JSON schema file.

     #### Step 1: Save your schema file in Cloud Shell

     In your Cloud Shell terminal, run:

     ```
     nano ~/facebook_metrics.json
     ```

     Paste your schema in the following format:

     ```json theme={null}
     [
       { "name": "DATA_SYNC_TIME", "type": "DATETIME" },
       { "name": "REPORTING_PERIOD_START_DATE", "type": "DATE" },
       { "name": "REPORTING_PERIOD_END_DATE", "type": "DATE" },
       { "name": "REPORTING_PERIOD_IN_DAYS", "type": "INTEGER" },
       { "name": "IMPRESSIONS", "type": "FLOAT" },
       { "name": "CLICKS", "type": "FLOAT" },
       { "name": "ENGAGEMENTS", "type": "FLOAT" }
     ]
     ```

     You can find all Schema here:

     * [Instagram Feed Schema](/guides/integration/connect-bigquery-to-dash-social/instagram-feed-schema)
     * [Instagram Stories Schema](/guides/integration/connect-bigquery-to-dash-social/instagram-stories-schema)
     * [TikTok Schema](/guides/integration/connect-bigquery-to-dash-social/bigquery-tiktok-schema)
     * [Facebook Schema](/guides/integration/connect-bigquery-to-dash-social/bigquery-facebook-schema)

     Press Control + O to save, then Enter, then Control + X to exit.

     #### Step 2: Run the CLI command

     Use this command to create the table in BigQuery:

     ```
     bq mk --table \
       marketing-data-prod:social_analytics.facebook_metrics \
       ~/facebook_metrics.json
     ```

     Make sure to replace:

     * projectID: e.g. marketing-data-prod
     * datasetID: e.g. social\_analytics
     * tableID: e.g. facebook\_metrics

     This method is useful if you're creating multiple tables or scripting the setup process.

Repeat this step for each channel you want to integrate.

## Connect to Dash Social

### Step 3: Link BigQuery in Dash Social

1. In Dash Social, go to **Settings > Integrations**.
2. Click **BigQuery**.
3. For each workflow (channel), enter the correct values:
   * `projectID`: e.g. `marketing-data-prod`
   * `datasetID`: e.g. `social_analytics`
   * `tableID`: e.g. `tiktok_metrics`

<Warning>
  **Don't paste the full table path into each field. Instead, break it into three parts.**

  If your full BigQuery table path is:

  ```
  marketing-data-prod.social_analytics.tiktok_metrics
  ```

  You should enter:

  | Field       | Correct Input         |
  | ----------- | --------------------- |
  | `projectID` | `marketing-data-prod` |
  | `datasetID` | `social_analytics`    |
  | `tableID`   | `tiktok_metrics`      |

  Do **not** enter `marketing-data-prod.social_analytics.tiktok_metrics` into any of the fields.
</Warning>

4. Set the **Reporting Period in Days** (e.g. `7` for the last 7 days).
5. Click **Save**.

Dash Social will now begin writing daily updates into your specified tables.

***

# Final Outcome

Once connected, your BigQuery tables will be automatically populated with fresh social metrics daily. This makes it easy to build dashboards, run queries, and feed marketing data into analytics pipelines.
