> For the complete documentation index, see [llms.txt](https://documentation.immuta.com/saas/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.immuta.com/saas/configuration/integrations/google-bigquery/google-bigquery-viewless-integration/register-a-google-bigquery-connection.md).

# Register a Google BigQuery Connection

{% hint style="info" %}
**Public preview**: This integration is available to all accounts that request to enable it for their tenant. Contact your Immuta representative to enable it.
{% endhint %}

{% hint style="info" %}
**Immuta policies will not be automatically enforced in Google BigQuery**

While you can author and apply subscription and data policies on Google BigQuery data sources within Immuta, these policies will not be enforced natively in the Google BigQuery platform.

To use this integration, contact your Immuta representative.
{% endhint %}

## Requirement

BigQuery Enterprise or Enterprise Plus edition

## Permissions

The user registering the connection must have the permissions below.

* `APPLICATION_ADMIN` Immuta permission
* The Google BigQuery user setting up the connection must be able to
  * Create a service account and grant that service account the necessary BigQuery permissions. To do so, the setup user needs the following permissions:
    * `roles/iam.serviceAccountCreator`
    * `roles/iam.serviceAccountAdmin`
    * `roles/resourcemanager.projectIamAdmin` (or a project owner)
  * Create a JSON key

## Create a Google Cloud service account and custom role

Create the prerequisite role, service account, and private key file for Immuta to connect to Google BigQuery.

1. [Create a custom role using the console](https://cloud.google.com/iam/docs/creating-custom-roles#creating_a_custom_role) and bind it to the project or the specific datasets you want ingested in Immuta. The custom role should have the following privileges:
   * `bigquery.datasets.get`
   * `bigquery.tables.get`
   * `bigquery.tables.list`
2. [Create a service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts#creating) and grant it the custom role you just created.
3. [Enable the Google BigQuery API](https://cloud.google.com/endpoints/docs/openapi/enable-api#enabling_an_api).

You will use the private key file generated after completing these steps to register your Google BigQuery connection.

## Register a Google BigQuery connection

1. In Immuta, click <i class="fa-database">:database:</i> **Data** and select **Connections** in the navigation menu.
2. Click the **+ Add Connection** button.
3. Select the **Google BigQuery** tile.
4. Enter the connection information:
   1. **Display Name:** This is the name of your new connection. This name will be used in the API (`connectionKey`), in data source names from the host, and on the connections page. Avoid the use of periods (`.`) or [restricted words](#user-content-fn-1)[^1] in your connection name.
   2. Upload your GCP **Service Account Key JSON File**. This is the private key file generated in create a Google Cloud service account and role for Immuta to use to connect to Google BigQuery. Uploading this file will auto-populate the following fields:
      1. **Project ID**: The Google Cloud Platform project to operate on (where your Google BigQuery data warehouse is located).
      2. **Service Account**: The service account you created.
   3. **Location**: This is the location or region used for the dataset and query operations.
   4. **Directory Customer ID:** This is the Google Workspace customer ID for the organization that the governed BigQuery project belongs to. See the [Google Workspace documentation](https://knowledge.workspace.google.com/admin/getting-started/find-your-customer-id) for guidance on how to find this ID.
   5. **Immuta Dataset**: The name of the Google BigQuery dataset to create inside the project. If you are using multiple environments in the same Google BigQuery project, this dataset must be unique across environments.
   6. **Immuta role**: The [custom role you created](#create-a-google-cloud-service-account-and-custom-role).
5. Opt to **Enable Object Sync**, which will keep your connection objects up to date with your Google BigQuery environment.
   1. Select the **Start Time** for when the first object sync job will run each day.
   2. Select the **Run Frequency** to determine how frequently object sync will run each day.
   3. Opt to **Run Object Sync on Create** to create all the data objects for your connection. If you do not select this option, you must run object sync manually or wait for the scheduled object sync for your connection's data objects.
6. Click **Save connection**.

[^1]: Your display name cannot be any of the following words: `data`, `connection`, `object`, `crawl`, `search`, `settings`, `metadata`, `permission`, `sync`, `bulk`, and `upgrade`.


---

# 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://documentation.immuta.com/saas/configuration/integrations/google-bigquery/google-bigquery-viewless-integration/register-a-google-bigquery-connection.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.
