# Google BigQuery integration

> Fully managed serverless data warehouse for large-scale analytics, SQL queries, streaming inserts, and BigQuery ML.

- Authentication: oauth2

## Tools (47)

- **Batch Delete Row Access Policies**: Delete all listed row access policies on a table in one call.
- **Cancel Job**: Request cancellation of a running BigQuery job. Returns immediately — poll Get Job to confirm.
- **Create Dataset**: Create a new BigQuery dataset in a specific location. Location is required and cannot be changed later.
- **Create Routine**: Create a routine: scalar UDF, aggregate function, table-valued function, or stored procedure.
- **Create Row Access Policy**: Create a row-level security policy on a table with a SQL filter predicate and grantee list.
- **Create Table**: Create a standard, external, view, or materialized-view table. Supports time/range partitioning and clustering.
- **Delete Dataset**: Delete a dataset. Requires deleteContents=true if the dataset is non-empty.
- **Delete Job**: Delete metadata of a completed job. The job must be in DONE state.
- **Delete Model**: Delete a BigQuery ML model from a dataset. Irreversible.
- **Delete Routine**: Delete a routine (UDF, table function, or stored procedure) from a dataset.
- **Delete Row Access Policy**: Delete one row access policy from a table.
- **Delete Table**: Permanently remove a table. Irreversible; consider a snapshot first if needed.
- **Get Dataset**: Retrieve a dataset's metadata (location, default expirations, encryption, labels, ACL).
- **Get Job**: Fetch a job by ID. Poll status.state to track PENDING → RUNNING → DONE and inspect errorResult / stats.
- **Get Model**: Get a single ML model with training runs, hyperparameter trials, evaluation metrics, and remote-model info.
- **Get Project Service Account**: Get the BigQuery service account for a project, used to authorize KMS key access for CMEK.
- **Get Query Results**: Retrieve results for a query job. Blocks up to timeoutMs waiting for completion, then returns rows + schema.
- **Get Routine**: Fetch a single routine (UDF, table function, or stored procedure) including its definition body.
- **Get Routine IAM Policy**: Read the IAM access-control policy attached to a routine.
- **Get Row Access Policy**: Fetch a single row access policy on a table by policy ID.
- **Get Row Access Policy IAM Policy**: Read the IAM policy (grantee bindings) attached to a row access policy.
- **Get Table**: Fetch a table's full resource: schema, numRows, location, partitioning, clustering, view definitions.
- **Get Table IAM Policy**: Read the IAM access-control policy attached to a table or view.
- **Insert Job (Async Query, Load, Extract, Copy)**: Start an asynchronous BigQuery job — query, load from GCS, extract to GCS, or copy table. Returns a job reference to poll.
- **List Datasets**: List datasets in a project. Returns datasetReference and location — reuse location on subsequent job/query calls.
- **List Jobs**: List jobs in a project, newest first. Default returns only the caller's jobs; allUsers=true requires project owner.
- **List Models**: List BigQuery ML models in a dataset. Returns slim summaries; call Get Model for full training details.
- **List Projects**: List every GCP project the connected account has BigQuery read access on. Use to discover a projectId.
- **List Routines**: List routines in a dataset: scalar UDFs, table-valued functions, aggregate functions, stored procedures.
- **List Row Access Policies**: List row-level security policies on a table.
- **List Table Data**: Stream rows from a table without spending slot time on a query. Free read; no filters or aggregations.
- **List Tables**: List every table-like resource in a dataset (tables, views, materialized views, external tables, snapshots).
- **Run Query (Synchronous)**: Submit a SQL query and wait inline for results. Returns rows immediately, or a jobReference to poll if slow.
- **Set Routine IAM Policy**: Replace the IAM access-control policy on a routine.
- **Set Table IAM Policy**: Replace the IAM access-control policy on a table or view (grant/revoke table-level access).
- **Stream Insert Rows**: Insert rows via the streaming API. Rows are queryable within seconds. Always inspect insertErrors — HTTP 200 may still report row-level failures.
- **Test Routine IAM Permissions**: Check which of a list of permissions the caller holds on a routine.
- **Test Row Access Policy IAM Permissions**: Check which permissions the caller holds on a row access policy.
- **Test Table IAM Permissions**: Check which of a list of permissions the caller holds on a table.
- **Undelete Dataset**: Restore a deleted dataset within its time-travel window (default 7 days).
- **Update Dataset (Full Replace)**: Replace an entire dataset resource with the request body (PUT). Fields omitted from the body are reset.
- **Update Dataset (Patch)**: Partial update of a dataset (RFC 5789). Only fields in the body are changed. Use PUT for full overwrite.
- **Update Model (Patch)**: Partial update of an ML model's metadata: description, labels, expiration, friendly name.
- **Update Routine (Full Replace)**: Replace an entire routine definition (PUT). Send the complete resource.
- **Update Row Access Policy**: Replace a row access policy's filter predicate or grantees (PUT).
- **Update Table (Full Replace)**: Replace an entire table resource with the request body (PUT). Fields omitted are reset.
- **Update Table (Patch)**: Partial update of a table (RFC 5789). Edit name/description/labels/expiration/requirePartitionFilter.

## Related prompts

- [Weekday morning business metrics anomaly digest in Slack](https://www.generalinput.com/prompts/weekday-morning-business-metrics-anomaly-digest-in-slack.md)
- [Hourly Shopify orders sync to BigQuery](https://www.generalinput.com/prompts/hourly-shopify-orders-sync-to-bigquery.md)
- [Nightly BigQuery to HubSpot contact score sync](https://www.generalinput.com/prompts/nightly-bigquery-to-hubspot-contact-score-sync.md)
- [Weekly executive review from BigQuery, published in Notion](https://www.generalinput.com/prompts/weekly-executive-review-from-bigquery-published-in-notion.md)

Connect Google BigQuery in General Input: https://www.generalinput.com/apps/bigquery