Setup
Confirm prerequisites
A Google Cloud project with the BigQuery API enabled.
A service account with a JSON key file.
Grant the required permissions
Grant the service account these IAM roles on the project (or on specific datasets if you prefer tighter scoping):
- BigQuery Job User (
roles/bigquery.jobUser) — required to run query jobs - BigQuery Data Viewer (
roles/bigquery.dataViewer) — required to read table and view data
roles/datacatalog.categoryFineGrainedReader) on the relevant policy tags to read protected columns.Add the connection in Duvo
On the Connections page, open BigQuery and fill in these fields:
JSON
required
The full contents of your service account JSON key file. Open the downloaded
.json file in a text editor, copy everything, and paste it here. The JSON must include project_id, client_email, and private_key fields.Capabilities
- Run SQL queries — Execute standard SQL against any dataset and table your service account can access, including aggregation and filtering queries.
- Explore schemas — List available datasets, tables, and column definitions using BigQuery’s
INFORMATION_SCHEMAviews. - Export results — Query results are automatically saved as files in your workspace, optimized for efficient downstream processing by your agent.
Key Benefits
- Direct warehouse access — Query petabytes of data without manual exports or CSV downloads.
- Real-time insights — Pull current metrics and KPIs straight from your data warehouse into automated workflows.
- Secure, scoped access — Service account permissions control exactly which projects and datasets your agents can reach.
- Data-driven automation — Combine warehouse data with other connections to make intelligent decisions within a workflow.
Things to Know
- Query results are capped — A single query export returns at most 1,000,000 rows (or roughly 1 GiB of result data, not bytes scanned, whichever is hit first). Queries under the cap are unaffected.
- Truncated results are flagged — When a result hits the cap, the agent receives the rows up to the cap along with a clear truncation notice, so a partial result is never mistaken for the full set. The agent can then refine the query, for example by adding filters, aggregating in SQL, or selecting fewer columns.
- To retrieve more than the cap, page through the results — Request successive batches using a stable sort key, with
WHERE key > last-key ORDER BY key. Adding aLIMITdoes not help: it returns fewer rows, not the rest. - Design queries for summaries, not dumps — For very large tables, ask agents to aggregate or filter in SQL rather than exporting raw rows. This keeps results under the cap and speeds up downstream processing.
Works Well With
Google Sheets
Query BigQuery for raw data, then write summaries or reports into a spreadsheet for stakeholders.
Slack
Pull key metrics from your warehouse and post automated updates to team channels.
Gmail
Generate data-driven reports from BigQuery and email them on a schedule.