# Integrating with BigQuery

[Prerequisites](#prerequisites)

[BigQuery Setup](#bigquery-setup)\
&#x20;   [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="/files/rsXJmDcVZ1mWn01nwTUY" 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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integrations.drivetrain.ai/integration-guide/integrate-with-drivetrain/databases-and-warehouses/integrating-with-bigquery.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
