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

# BigQuery

{% content-ref url="/pages/VX0tkDbt11AA2U19yhei" %}
[BigQuery Metadata Extracted](/integrations/data-warehouses/bigquery-integration/bigquery-metadata.md)
{% endcontent-ref %}

## Getting Started with Big Query

There are three steps to connect Big Query with Secoda:

1. Enable the Big Query API
2. Create a service account for Secoda
3. Connect Big Query to Secoda

#### Enable Big Query API for GCP <a href="#h_3ec8fd603e" id="h_3ec8fd603e"></a>

Log in to your existing project on GCP and [enable the BigQuery API](https://cloud.google.com/bigquery/docs/quickstarts/quickstart-web-ui). Once you’ve done so, you should see BigQuery in the [“Resources” section](https://cl.ly/0W2i2I2B2R0M) of Cloud Platform.

#### Create a service account for Secoda <a href="#h_f7ed2acb85" id="h_f7ed2acb85"></a>

To provide [least privilege](https://en.wikipedia.org/wiki/Principle_of_least_privilege) to Secoda for extracting Big Query metadata, you can create a new service account following the steps below. Refer to [Google Cloud’s documentation about service accounts](https://cloud.google.com/iam/docs/creating-managing-service-accounts) for more information.

1. From the Navigation panel on the left, go to **IAM & admin** > **Service accounts**
2. Click **Create Service Account** along the top
3. Enter a name (for example: “secoda”) and click **Create**
4. When assigning permissions, make sure to grant the following permissions:

a) If you're creating the service account via the GCP console add the following roles:

```
BigQuery Metadata Viewer
BigQuery Resource Viewer
BigQuery Data Viewer
BigQuery Job User
```

If you want to enable metadata push feature, add the following role:

```
BigQuery Data Editor
```

If you want to enable syncing policy tags, add the following roles:

```
Data Catalog Admin
Data Catalog Tag Editor
Tag User
```

b) If you're programatically creating the service account add the following roles:

```
roles/bigquery.metadataViewer
roles/bigquery.resourceViewer
roles/bigquery.dataViewer        
roles/bigquery.jobUser
```

If you want to enable metadata push feature, add the following role:

```
roles/bigquery.tables.update
```

If you want to enable syncing policy tags, add the following roles:

```
roles/datacatalog.admin
roles/datacatalog.tagEditor
roles/datacatalog.tagUser
```

5\. [Create a JSON key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys). The downloaded file will be used to create your warehouse in the next section.

#### Connect Big Query to Secoda <a href="#h_724f251572" id="h_724f251572"></a>

* Log into your Secoda profile at <https://app.secoda.co>
* From the Navigation panel on the left go **Integrations** > **Add new integration**
* Select **Big Query**
* Enter in the project name and paste the JSON key file contents that was downloaded
* Click "Connect"


---

# 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 dynamically by asking a question.

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

```
GET https://docs.secoda.co/integrations/data-warehouses/bigquery-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
