> For the complete documentation index, see [llms.txt](https://integrations.drivetrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.drivetrain.ai/integration-guide/readme/databases-and-warehouses/integrating-with-bigquery.md).

# Integrating with BigQuery

Bring BigQuery datasets into Drivetrain to power financial models with warehouse-scale data. Covers service account, IAM roles, project ID, and connection.

[Prerequisites](#prerequisites)

[BigQuery Setup](#bigquery-setup)\
[Add an external user in BigQuery](#add-an-external-user-in-bigquery)

## Prerequisites

To connect BigQuery to Drivetrain, you need:

* An active BigQuery account
* Sharing privileges on BigQuery
* Admin privileges in Drivetrain

## BigQuery Setup <a href="#bigquery-setup" id="bigquery-setup"></a>

Drivetrain supports integration with BigQuery from a read-only external user account. To get started you would need to share the read-only access with <drivetrain@integrations-417606.iam.gserviceaccount.com> service account.

### Add an external user in BigQuery <a href="#add-an-external-user-in-bigquery" id="add-an-external-user-in-bigquery"></a>

To grant an access to external user, (someone who is not listed as an employee in the company), follow these steps:

1. Select the **Dataset/ Resource** which is to be shared with the user.
2. From the **Sharing** option on the right top of the page, route to **Permissions**.
3. Add <drivetrain@integrations-417606.iam.gserviceaccount.com> as principal.
4. Assign role - Set as **BigQuery Data Viewer**.
5. Select the above role & click **Save**

<div align="left"><figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-d0e1e316296d44fcb1eda17396f9749ff44fd7e9%2Fimage%20(13).png?alt=media" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
That’s it! Share the below details with your Customer Success Manager or Data Integrations Manager so that they can get started:

1. If you have given access to complete dataset, please share Project ID/Name and Dataset Name.
2. If you have given access to specific tables in the dataset, please Project ID/Name, Dataset Name and Table Names.
   {% endhint %}


---

# 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://integrations.drivetrain.ai/integration-guide/readme/databases-and-warehouses/integrating-with-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.
