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.
What you’ll prepare
Section titled “What you’ll prepare”- A Google Cloud service account with read-only access to the relevant datasets.
- The service account’s JSON key file.
1. Create a service account
Section titled “1. Create a service account”In the Google Cloud console:
- Select the project that contains your data.
- Go to IAM & Admin → Service Accounts → Create service account.
- Name it something recognizable, e.g.
streya-reader.
2. Grant read-only access
Section titled “2. Grant read-only access”The service account needs two things: permission to read the data and permission to run queries.
Grant these roles:
| Role | Why |
|---|---|
BigQuery Data Viewer (roles/bigquery.dataViewer) | Read tables and their schemas |
BigQuery Job User (roles/bigquery.jobUser) | Run queries in the project |
3. Create a JSON key
Section titled “3. Create a JSON key”- Open the service account → Keys → Add key → Create new key.
- 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.
4. Connect it in Streya
Section titled “4. Connect it in Streya”In Streya, go to Workspace settings → Data Warehouse and choose BigQuery, then provide your key:
| Field | What 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.
Troubleshooting
Section titled “Troubleshooting”Access Deniedon a table — the service account is missingData Vieweron that table’s dataset.Permission denied while creating job— the service account is missingJob Userat 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.