# BigQuery

{% hint style="info" %}
If your organization uses Google Cloud [Private Service Connect](https://cloud.google.com/vpc/docs/private-service-connect), Arcwise can’t support it yet. Please let us know if this is something you need!
{% endhint %}

## Step 1: Create a Service Account in GCP

1. Choose an existing service account or create a new one. Instructions on setting up a GCP service account can be found [here](https://cloud.google.com/iam/docs/creating-managing-service-accounts). We recommend a new service account: `Arcwise`
2. Grant the service account the proper level of access to BigQuery. More information on permissions [here](https://cloud.google.com/bigquery/docs/access-control-basic-roles). Access should be granted from IAM management. Minimally, Arcwise requires:
   1. BigQuery Job User
   2. BigQuery Read Session User
   3. BigQuery Data Viewer (\* This can be granted on a [per-dataset level](https://cloud.google.com/bigquery/docs/control-access-to-resources-iam#grant_access_to_a_dataset) to only the datasets you would like Arcwise to access)
3. Create a dataset in BigQuery called `arcwise_snapshots`. For more information on creating datasets see [here](https://cloud.google.com/bigquery/docs/datasets).
   * Arcwise will use this dataset to create zero-cost [table snapshots](https://cloud.google.com/bigquery/docs/table-snapshots-intro) of tables that have been connected to Google Sheets.
4. Grant the service account the proper level of access to the `arcwise_snapshots` dataset. For information on how to grant access to an individual dataset see [here](https://cloud.google.com/bigquery/docs/control-access-to-resources-iam#console). Grant the following access:
   1. BigQuery Data Owner
5. Generate a JSON Key file for the service account. This will be used later.

### Step 2: Link Account to Arcwise

Navigate to <https://admin.arcwise.app/> and go to the connections tab.

Open your JSON key file and copy+paste the contents into the textbox, then press Save.

<figure><img src="/files/t3dcNQpQvbfcXCCRGfG9" alt="" width="375"><figcaption></figcaption></figure>


---

# 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://docs.arcwise.app/arcwise-setup/connect-data-warehouse/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.
