Graphrt

Google BigQuery

Datasets, tables and schemas, parameterised GoogleSQL with a bytes-billed cap on every query, free dry runs and paged typed results, agent tools run SELECT only (dry-run checked) unless opted in

Beta v0.1.0 Node.js 5 actions
Use in Graphrt Desktop

About

A Graphrt plugin for Google BigQuery (API v2). It lists datasets and tables, reads schemas and runs parameterised GoogleSQL with a hard bytes-billed cap. Agent tools only run SELECT statements, checked with a free dry run. No npm dependencies, Google auth is the same code as the google-sheets plugin (byte-identical copies in lib/).

What it can do

  • list_datasets, list_tables (paginated) and get_table (schema with nested fields flattened to a.b, row and byte counts, partitioning, clustering).
  • query: (a job with a plugin-chosen id) one GoogleSQL statement with @named (object) or ? (array) parameters. Returns rows as objects, the schema, total_rows, bytes processed, cache_hit, affected_rows for DML and next_cursor. dry_run: true validates the SQL and estimates bytes for free (statement type, schema, referenced tables).
  • get_query_results: the next page from a next_cursor, or the rows of a query that was still running.
  • Values: INT64 is a number when exact, else a string, NUMERIC/BIGNUMERIC are strings, TIMESTAMP is ISO 8601 with microseconds, JSON is parsed, RECORD/REPEATED nest, DATE, TIME, DATETIME, GEOGRAPHY and BYTES (base64) are strings. Parameters infer STRING, INT64, FLOAT64, BOOL and ARRAY<T>, pass {"type": "DATE", "value": "2026-11-01"} (or NUMERIC, TIMESTAMP, ARRAY<STRING>, ...) for the rest.
  • Full reference: OPERATIONS.md.

Actions

Each action is a step you can add to a workflow. Agents can also use most of them as tools.

  • List datasets bigquery.list_datasets
  • List tables bigquery.list_tables
  • Get table schema bigquery.get_table
  • Run query bigquery.query
  • Get query results bigquery.get_query_results

Settings

Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.

  • GOOGLE_SERVICE_ACCOUNT_JSON (none)
    Path to a service account key file (recommended for servers)
  • GOOGLE_REFRESH_TOKEN (none)
    OAuth refresh-token grant (scope https://www.googleapis.com/auth/bigquery)
  • GOOGLE_ACCESS_TOKEN (none)
    A ready access token (used first, replaced by a configured grant after a 401)
  • BIGQUERY_PROJECT_ID (none)
    Default project for every call, project_id overrides it per call
  • BIGQUERY_LOCATION (auto)
    Default job location, e.g. US, EU, asia-southeast1
  • BIGQUERY_MAX_BYTES_BILLED 1073741824 (1 GiB)
    Bytes-billed cap sent with every query. A call's maximum_bytes_billed may lower it, never raise it.
  • BIGQUERY_MAX_RESULT_BYTES 2000000
    Most JSON bytes of rows per call, the rest comes with next_cursor
  • BIGQUERY_QUERY_TIMEOUT_MS 30000
    How long query waits for results by default (wait_ms up to 90000)
  • BIGQUERY_TOOL_ALLOW_WRITES (off)
    1 lets agent tools run DML, DDL and scripts (and skips the dry-run check)
  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET
  • GOOGLE_CLOUD_PROJECT

How to use it

In Graphrt Desktop

  1. Open Plugins and search for Google BigQuery.
  2. Click Install and approve it.
  3. Follow the setup steps on the plugin's page, then paste the settings it needs.
  4. Describe a job that needs it, and the builder adds the steps.
Plugins in Graphrt Desktop

With the CLI

terminal
$ graphrt plugin install bigquery
workflow.yaml
- id: revenue
  type: bigquery.query
  sql: "SELECT DATE(created_at) AS day, SUM(total) AS revenue FROM shop.orders WHERE created_at >= @since GROUP BY day ORDER BY day"
  params: { since: { type: "TIMESTAMP", value: "2026-11-01 00:00:00+07" } }
  maximum_bytes_billed: 500000000
- id: more
  type: bigquery.get_query_results
  cursor: "{{#revenue.next_cursor#}}"
Plugins in the docs