Skip to content

Connect BigQuery

Streya connects to BigQuery with a service account — a dedicated, non-human identity you create in Google Cloud and scope to the data Streya should see.

  • A Google Cloud service account with read-only access to the relevant datasets.
  • The service account’s JSON key file.

In the Google Cloud console:

  1. Select the project that contains your data.
  2. Go to IAM & Admin → Service Accounts → Create service account.
  3. Name it something recognizable, e.g. streya-reader.

The service account needs two things: permission to read the data and permission to run queries.

Grant these roles:

RoleWhy
BigQuery Data Viewer (roles/bigquery.dataViewer)Read tables and their schemas
BigQuery Job User (roles/bigquery.jobUser)Run queries in the project
  1. Open the service account → Keys → Add key → Create new key.
  2. Choose JSON and download the file.

The key file looks like this:

{
"type": "service_account",
"project_id": "your-project-id",
"private_key_id": "",
"private_key": "-----BEGIN PRIVATE KEY-----\n\n-----END PRIVATE KEY-----\n",
"client_email": "streya-reader@your-project-id.iam.gserviceaccount.com",
"client_id": "",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token"
}

Streya requires the type, project_id, private_key, and client_email fields — the standard key file contains all of them, so you can use the file as-is.

In Streya, go to Workspace settings → Data Warehouse and choose BigQuery, then provide your key:

FieldWhat to enter
Service Account Key (JSON)Upload the JSON key file, or paste its full contents

Click Connect Data Warehouse. Streya runs a test query and shows the connection status. Your credentials are encrypted and stored in a dedicated secrets manager — see Data connections for how credentials are handled.

  • Access Denied on a table — the service account is missing Data Viewer on that table’s dataset.
  • Permission denied while creating job — the service account is missing Job User at the project level.
  • Key rotation — if your security policy rotates keys, generate a new JSON key, then open Workspace settings → Data Warehouse → Edit Connection and paste the new key; the connection is updated without downtime.