# BigQuery

To connect to your Google BigQuery, we recommend creating a new service account exclusively for use by the Erathos platform.

This approach follows best practices, as it allows you to assign only the minimal roles needed for this service account and makes it easier to manage and revoke access when necessary.

{% hint style="info" %}
If you dont have a Google BigQuery, we can host for you. Referer to [hosted-by-erathos](https://docs.erathos.com/~/changes/58/destinations/bigquery/hosted-by-erathos "mention")
{% endhint %}

### Creating a service account

To create a service account, follow these steps:

1. **Navigate to the IAM & Admin Section**
   * From the main menu, go to **IAM & Admin** > **Service Accounts**.
2. **Create a New Service Account**
   * Click on the **+ CREATE SERVICE ACCOUNT** button.
   * Provide a **Name** and **Description** for the service account to help identify its purpose, e.g., "Erathos Access Account."
3. **Set Permissions**
   * On the same screen, assign **roles** to the service account. For minimal access, assign only the following roles needed for Erathos to connect to your BigQuery:
     * **BigQuery Data Editor.**
     * **BigQuery Job User.**
     * **BigQuery Metadata Viewer.**
     * **BigQuery User.**
   * Click **Continue**.
4. **Generate a Key for the Service Account**
   * After creating the service account, locate it in the **Service Accounts** list and click on it.
   * Go to the **Keys** tab, click **ADD KEY** > **Create new key**.
   * Select **JSON** as the key type and click **Create** to download the key file. This file is essential for authenticating Erathos with Google BigQuery.

{% embed url="<https://www.tella.tv/video/cm3fxbs8c000003mb6cbr12tw/embed?a=0&b=0&loop=0&muted=0&t=0&title=0&wt=0>" %}

### Connect to Erathos

To connect Erathos to your BigQuery:

1. **Create a New Destination**
   * Go to **Settings** > **Data Warehouse**.
   * Select **Google BigQuery**.
2. **Fill Out the Form**
   * Check the box for **Self-hosted.**
   * Upload the JSON file obtained from the previous step
   * Select the region where your data will be hosted (if unsure, we recommend using `US`).
3. **Complete the Setup.**

{% embed url="<https://www.tella.tv/video/cm3ehotcm000q03m8gpdngypw/embed?a=0&b=0&loop=0&muted=0&t=0&title=0&wt=0>" %}

{% hint style="info" %}
If you need help connecting to your BigQuery, reach out to our team at <support@erathos.com>.
{% endhint %}
