Graphrt

Google BigQuery

Dataset, tabel dan skema, GoogleSQL berparameter dengan batas bytes billed di setiap query, dry run gratis dan hasil bertipe per halaman. Tool agent hanya menjalankan SELECT (dicek dengan dry run) kecuali diizinkan

Beta v0.1.0 Node.js 5 aksi
Pakai di Graphrt Desktop

Tentang

Plugin Graphrt untuk Google BigQuery (API v2). Plugin ini menampilkan dataset dan tabel, membaca skema dan menjalankan GoogleSQL berparameter dengan batas bytes billed yang ketat. Tool agent hanya menjalankan statement SELECT, yang dicek dulu dengan dry run gratis. Tanpa dependensi npm, autentikasi Google memakai kode yang sama dengan plugin google-sheets (salinan identik di lib/).

Yang bisa dilakukan

  • 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.

Aksi

Setiap aksi adalah langkah yang bisa ditambahkan ke workflow. Agent juga bisa memakai sebagian besar aksi sebagai tool.

  • 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

Pengaturan

Graphrt menyalakan plugin dengan environment yang bersih. Hanya nilai ini yang sampai ke plugin, dan secret tidak masuk log.

  • 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

Cara memakainya

Di Graphrt Desktop

  1. Buka Plugins dan cari Google BigQuery.
  2. Klik Install lalu setujui.
  3. Ikuti langkah setup di halaman plugin, lalu tempel pengaturan yang dibutuhkan.
  4. Jelaskan pekerjaan yang membutuhkannya, dan builder menambahkan langkahnya.
Plugin di Graphrt Desktop

Dengan 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#}}"
Plugin di docs