> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heyhumm.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating BigQuery Service Account Credentials

> How to generate and configure service account credentials for BigQuery integrations.

## 1. Create a Service Account

1. Go to the [Google Cloud Console](https://console.cloud.google.com/) and select the project that contains your BigQuery instance
2. Navigate to **IAM & Admin** > **Service Accounts**
3. Click **+ Create service account**
4. Follow the prompts to fill out the form

## 2. Grant Required Permissions

When you get to the "Permissions" stage, select the following roles:

| Role                                                              | Description                                                         |
| ----------------------------------------------------------------- | ------------------------------------------------------------------- |
| **BigQuery Data Viewer** (`roles/bigquery.dataViewer`)            | Allows reading data from BigQuery tables                            |
| **BigQuery Job User** (`roles/bigquery.user`)                     | Allows running queries and jobs                                     |
| **BigQuery Read Session User** (`roles/bigquery.readSessionUser`) | Required for efficient data transfer when reading large result sets |

Alternatively, you can create a custom role with read access to the specific datasets you would like Humm to access.

## 3. Generate a JSON Key

Once the service account is created, you need to create an access key for Humm to use:

1. From the Service Accounts list view, find the service account you created
2. Click **Actions** > **Manage keys**
3. Click **Add key** > **Create new key**
4. Select **JSON** as the key type

This will download a credentials file to your local machine.

<Warning>
  Store this credentials file securely. Do **not** commit it to git or share it publicly. This file grants access to your BigQuery data.
</Warning>

## 4. Upload the Credentials to Humm

1. [Log into Humm](https://app.heyhumm.ai) and navigate to **Integrations** > **Add Integration**
2. Locate BigQuery and click **Configure**
3. Fill out the form as directed and paste the contents of the downloaded credentials file into the **Service account credentials JSON** field

Alternatively, you can provide the credentials file to your Humm account rep and we can configure the connection for you.
