> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# BigQuery

> Read-only SQL against BigQuery.

Go to **Connections**, click **Connect** next to BigQuery, and enter the project ID and a service account key in JSON format.

## Permissions

The service account needs the BigQuery Data Viewer and Job User roles, plus BigQuery Connection User if you query through BigQuery Connections. The setup command grants all three.

### Read-only queries

Run read-only SQL during investigations and measure the impact of open issues.

| Granted by | Used for |
| - | - |
| **BigQuery Data Viewer** (`roles/bigquery.dataViewer`) | Reading tables |
| **BigQuery Job User** (`roles/bigquery.jobUser`) | Running query jobs |

### BigQuery Connections

Only if you query through BigQuery Connections (federated queries to Cloud SQL, Postgres and others).

Granted by: **BigQuery Connection User** (`roles/bigquery.connectionUser`).

* Ordyn rejects project-level BigQuery write permissions when its connection check can verify them.
* The setup command grants BigQuery Data Viewer on the whole project. To limit Ordyn to the datasets you choose, grant Data Viewer on those datasets instead. Job User stays at the project level.

### How to grant

> **Grant the roles**
>
> ```bash theme={null}
> gcloud projects add-iam-policy-binding <project-id> --member "serviceAccount:<service-account-email>" --role roles/bigquery.dataViewer &&
> gcloud projects add-iam-policy-binding <project-id> --member "serviceAccount:<service-account-email>" --role roles/bigquery.jobUser &&
> gcloud projects add-iam-policy-binding <project-id> --member "serviceAccount:<service-account-email>" --role roles/bigquery.connectionUser
> ```

Replace the values in angle brackets.

Permission catalog version `2026-10-16.1`. See [permission changes](/reference/permission-changes).

## What Ordyn does with it

Answers data questions during investigations and measures the impact of [open issues](/open-issues/overview) with live queries you can inspect.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.