Skip to main content
Connect BigQuery for read-only querying during investigations.Your agent can inspect the current setup, prepare the connection and test access. You choose the account and resource scope, approve provider consent when needed, and authorize any required grants.
Connect BigQuery so Struct Agent can run read-only queries during investigations. Verify the requested dataset access and preserve read-only grants.

Inspect access and existing connections

Use a claimed workspace with permission to configure connections.
Use the catalog’s current fields, choices and permission requirements. Reuse an existing healthy connection instead of creating a duplicate.

Connect with the CLI

Supply credentials from approved secret storage through BIGQUERY_CREDENTIALS_JSON. The catalog describes which are needed for the selected authentication method. Do not put literal secrets in shell arguments or chat.Replace example values with the intended resource:
Use a dedicated service account with read access to the selected data. Supply its JSON key with --key-file or GOOGLE_APPLICATION_CREDENTIALS; keep the file outside source control. BigQuery requires the Pro plan. Struct rejects project-level BigQuery write access when its check can verify it. --dataset and --location are optional.

Verify and recover

Use the returned connection ID:
Inspect ok, health and missing permissions, not only the exit code. struct connections grant-command CONNECTION_ID prints repair instructions where supported; have an authorized operator apply them. For expired OAuth links, start the connection command again and use the new link. Do not reconnect to a different account silently.Verify a bounded operation for the requested job. Connection health proves checked access; it does not prove telemetry arrival, an investigation or alert delivery.

What Struct does with it

Answers data questions during investigations and measures the impact of Issues with live queries you can inspect.

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.

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).
  • Struct 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 Struct to the datasets you choose, grant Data Viewer on those datasets instead. Job User stays at the project level.

How to grant

Replace the values in angle brackets.Permission catalog version 2026-11-04.1. See permission changes.