> For the complete documentation index, see [llms.txt](https://docs.chord.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chord.co/activate/event-streaming/destinations/data-warehouses/bigquery.md).

# BigQuery

BigQuery is Google Cloud's fully managed, serverless data warehouse. It runs fast SQL analysis on large datasets. As a data warehouse destination, BigQuery can serve as the central data foundation. There, raw customer data from multiple sources, such as CRM systems, web analytics, transactions and marketing tools, is collected, cleaned and unified.

## Getting started

You need:

* Your Google Cloud [Project ID](https://support.google.com/googleapi/answer/7014113?hl=en).
* A name for the BigQuery [dataset](https://cloud.google.com/bigquery/docs/datasets-intro). Chord creates the dataset if it doesn't exist, so the service account needs permission to create datasets.
* A service account key. This is the Google service account JSON for BigQuery.

**Service account configuration**

A service account is a special Google account with an ID that looks like `NAME@PROJECT.iam.gserviceaccount.com`. The account can have one or more keys, each represented by JSON.

To use a service account for authorization, the resource you want to reach must be shared with that account.

The easiest way to create a service account is through the [Google Cloud Console](https://console.cloud.google.com/). Go to the navigation menu, then **IAM & Admin** > **Service accounts**. Create the service account and download its key as JSON. There are other ways to do it, including command-line tools. See Google's [documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys).

Paste the contents of the key file into the **Service Account Key File** field. It looks like this:

```json
{
  "type": "service_account",
  "project_id": "<PROJECT_ID>",
  "private_key_id": "<PK_ID>",
  "private_key": "<PRIVATE_KEY>",
  "client_email": "<EMAIL>",
  "client_id": "CID",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "<CERT_URL>"
}
```

## Settings

* **Destination Name** (required): a name to tell this destination apart.
* **Project ID** (required): your Google Cloud project ID.
* **BigQuery Dataset** (required): the BigQuery dataset Chord loads events into.
* **Service Account Key File** (required): the Google service account key JSON for BigQuery.
* **Consent Requirements** (optional): the consent categories a visitor must accept before Chord sends data to this destination. See [Consent](/activate/event-streaming/consent.md).

## Connect

Add **BigQuery** from the destination catalog, using the settings above. See [Connect a destination](/activate/event-streaming/connect-a-destination.md) for the full steps.

## How events load

Chord loads events in batches, typically about once an hour. Events do not appear in BigQuery the moment they happen.

## Tables and columns

Chord creates the dataset, the tables and the columns for you if they do not exist. You do not create them yourself.

Chord writes events to these tables:

* **`tracks`**: one row for every `track` event, with the event's top-level fields but not its properties.
* **One table for each event name**: the same `track` event, with its properties, in a table named after the event. Chord lowercases the name and replaces spaces with underscores, so `Order Completed` loads into `order_completed`.
* **`pages`**: `page` events.
* **`identifies`**: `identify` events.
* **`groups`**: `group` events.

Column names are written in snake case, for example `order_id`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chord.co/activate/event-streaming/destinations/data-warehouses/bigquery.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
