# Google BigQuery

Google Cloud data warehouse

- Category: Data warehouses
- Runs in: the Phloem cloud

Lets you and Hamming query one BigQuery dataset with SQL, with its tables listed in Trace.

## What Phloem reads
- The dataset's tables and views — columns, types, modes, descriptions, row counts and size — listed in Trace for Hamming and SQL autocomplete

## What you need
- The Google Cloud project ID and the dataset name
- A service account JSON key that can list the dataset's tables and run query jobs in the project
- The dataset's location, if it is not `US`

## Connect
1. In the console, open **Connectors**, choose **Add connector**, then **Google BigQuery**.
2. Enter **Project ID** and **Dataset**.
3. Paste the whole key file into **Service Account JSON**.
4. Set **Location** (e.g. `US` or `EU`). Empty means `US`.
5. Choose **Test Connection**, then **Create Connection**.

## What Hamming can do
- Run SQL that you or Hamming write, as the service account

## Notes
- One connector reads one dataset. Add a connector for each dataset you want in Trace.
- Queries run as jobs in the **Project ID** you entered and are billed there. Phloem sets no cap on bytes billed.
- Phloem runs any statement, not only `SELECT`. Give the service account read-only access to keep the connector read-only.

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| Project ID | Text | Yes | Google Cloud project ID |
| Dataset | Text | Yes | BigQuery dataset name |
| Service Account JSON | Text | Yes | Paste the full service account JSON credentials |
| Location | Text | No | Dataset location (e.g., US, EU) |
