Files
2026-02-19 12:11:01 +00:00

3.9 KiB

Google BigQuery Routing Reference

App name: google-bigquery Base URL proxied: bigquery.googleapis.com

API Path Pattern

/google-bigquery/bigquery/v2/{resource}

Common Endpoints

List Projects

GET /google-bigquery/bigquery/v2/projects

List Datasets

GET /google-bigquery/bigquery/v2/projects/{projectId}/datasets

Get Dataset

GET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}

Create Dataset

POST /google-bigquery/bigquery/v2/projects/{projectId}/datasets
Content-Type: application/json

{
  "datasetReference": {
    "datasetId": "my_dataset",
    "projectId": "{projectId}"
  },
  "location": "US"
}

Delete Dataset

DELETE /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}

List Tables

GET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables

Get Table

GET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}

Create Table

POST /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables
Content-Type: application/json

{
  "tableReference": {
    "projectId": "{projectId}",
    "datasetId": "{datasetId}",
    "tableId": "my_table"
  },
  "schema": {
    "fields": [
      {"name": "id", "type": "INTEGER"},
      {"name": "name", "type": "STRING"}
    ]
  }
}

Delete Table

DELETE /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}

List Table Data

GET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data

Run Query (Synchronous)

POST /google-bigquery/bigquery/v2/projects/{projectId}/queries
Content-Type: application/json

{
  "query": "SELECT * FROM `dataset.table` LIMIT 10",
  "useLegacySql": false
}

List Jobs

GET /google-bigquery/bigquery/v2/projects/{projectId}/jobs

Get Job

GET /google-bigquery/bigquery/v2/projects/{projectId}/jobs/{jobId}?location=US

Cancel Job

POST /google-bigquery/bigquery/v2/projects/{projectId}/jobs/{jobId}/cancel?location=US

Query Examples

Simple Query

{
  "query": "SELECT 1 as test",
  "useLegacySql": false
}

Query with Parameters

{
  "query": "SELECT * FROM `dataset.table` WHERE id = @id",
  "useLegacySql": false,
  "queryParameters": [
    {
      "name": "id",
      "parameterType": {"type": "INT64"},
      "parameterValue": {"value": "123"}
    }
  ]
}

Query to Destination Table

{
  "query": "SELECT * FROM `source_dataset.source_table`",
  "useLegacySql": false,
  "destinationTable": {
    "projectId": "my-project",
    "datasetId": "dest_dataset",
    "tableId": "dest_table"
  },
  "writeDisposition": "WRITE_TRUNCATE"
}

Common Schema Types

  • STRING - Text data
  • INTEGER - 64-bit signed integer
  • FLOAT - 64-bit floating point
  • BOOLEAN - True/false
  • TIMESTAMP - Point in time
  • DATE - Calendar date
  • RECORD - Nested structure

Notes

  • Authentication is automatic - the router injects the OAuth token
  • Project IDs are strings like my-project-123
  • Dataset and table IDs: letters, numbers, underscores only
  • Query results use f (fields) and v (value) structure
  • Use useLegacySql: false for standard SQL
  • Streaming inserts require BigQuery paid tier
  • Jobs include location in their reference (US, EU, etc.)
  • Use maxResults and pageToken for pagination

Resources