# 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/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 %}

### Sandbox mode

BigQuery Sandbox is a free usage tier that allows you to explore BigQuery without providing billing information. However, it comes with limitations — such as restricted storage, query usage, and no access to features like DML (Data Manipulation Language) operations.

**How to Disable Sandbox Mode**\
To disable Sandbox mode, you need to enable billing for your Google Cloud project.

1. Go to the Google Cloud Console.
2. Open your project.
3. Navigate to **Billing** and link a billing account.\
   Once billing is enabled, your project will automatically exit Sandbox mode, unlocking full BigQuery functionality.

{% hint style="info" %}
Enabling billing does **not** mean you will be charged immediately. Google Cloud offers a generous [free tier](https://cloud.google.com/bigquery/pricing#free-tier) for BigQuery, which includes free monthly quotas for storage and queries. As long as your usage stays within these limits, you won’t incur any charges.
{% endhint %}


---

# 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.erathos.com/destinations/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.
