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

# BigQuery

Establishing a workspace connection to a BigQuery data warehouse allows any workflow in that workspace to access tables from datasets in BigQuery.

To establish a connection to your BigQuery data warehouse, click the **Integrations** tab in your workspace and select **New Integration.**&#x20;

When establishing a connection, the following information is required:

| Input           | Description                                    |
| --------------- | ---------------------------------------------- |
| Connection Name | Choose a name for your connection              |
| Key             | Service account key file generated by BigQuery |

{% hint style="info" %}
Importing data uses the BigQuery Storage API, which must be enabled on your Google Cloud Platform account.
{% endhint %}

## **Database configuration instructions**

To connect Cascade to your BigQuery project, you will need to create a service account for Cascade to use.

### Generate a new BigQuery service account key

You must have Google Cloud admin permissions to create a service account. Google has documentation on creating a [service account](https://cloud.google.com/iam/docs/service-accounts) and [generating a service account key](https://cloud.google.com/storage/docs/authentication#generating-a-private-key).

1. Navigate to the [Google Developers Console](https://console.developers.google.com/). Before proceeding, click on the drop down to the left of the search bar and select the project to which you want to connect. Once selected, choose **Credentials** in the left menu:\ <img src="/files/tZRhvfHImBiFQpb10thX" alt="" data-size="original">
2. Click **CREATE CREDENTIALS** and choose **Service account**:\
   ![](/files/ySrqX9TBycFIhVQDef79)
3. Enter a name for the new service account, optionally add a description, and click **CREATE**:\
   ![](/files/kKgiUa90XGl4ECD7bfjZ)
4. Your service account requires two Google BigQuery [predefined roles](https://cloud.google.com/bigquery/access-control#curated_roles_comparison_matrix):

   * **BigQuery > BigQuery Data Editor**
   * **BigQuery > BigQuery Job User**

   Select the first role in the **Select a role** field, then click **ADD ANOTHER ROLE** and select the second role.

   After selecting both roles, click **CONTINUE**:\
   ![](/files/OIEvxEfwRZwQqGpagoHq)
5. Click **Done**:\
   ![](/files/gXAUrzAEgaGXbVSQe6Mr)
6. This will create your service account, which needs a key to access. Select the service account you just created, then click **KEYS**, then **Add Key:**\
   ![](/files/6r6SY607RyK7Xgj847NQ)\
   ![](/files/FByu8XiePTcXLTe472Fv)
7. Select **JSON** and click **CREATE**:\
   ![](/files/MLLQGsTMxZ18FVZm2DS4)
8. The JSON key will be saved to your computer. **BE SURE TO REMEMBER WHERE IT IS SAVED.** After noting the download location, click **CLOSE**:\
   ![](/files/gs7iatzNCplrikKBzTrE)

### Use your key to connect BigQuery to Cascade

1. Return to Cascade, and begin the process to connect a BigQuery database. When you see the form to enter your BigQuery credentials, first enter a name for the new database connection.
2. Open the service account key you downloaded from BigQuery in a text editor, and **copy** the contents.
3. In the **Key** field, paste the contents of the service account key into the text box.
4. Click **Test and Save** to complete the connection.

Once an integration is established, open a workflow and select **Import from BigQuery** to pull data from your database into Cascade.
