# 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="https://803372693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlIfwCAQgoIa97JJYtlXQ%2Fuploads%2FHrTTJgbC4vMkMyrUxJ2t%2FScreenshot%202023-06-06%20at%2012.32.51%20PM.png?alt=media&#x26;token=f2161ac4-1d10-49b2-9660-8047287704e5" alt="" width="375"><figcaption></figcaption></figure>
