gcp.bigquery.query.run ​
Run a BigQuery Standard SQL query and return result rows.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | Base-gcp |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | GCP CloudConnection UUID. |
project_id | string | No | — | Query/billing project; defaults to the connection's project. |
query | string | Yes | — | Standard SQL query to execute. |
query_parameters | json | No | — | BigQuery queryParameters list (named or positional). |
parameter_mode | string | No | — | NAMED or POSITIONAL. |
location | string | No | — | BigQuery location, e.g. US or EU. |
default_dataset | json | No | — | Default dataset {datasetId, projectId} for unqualified table names. |
max_results | integer | No | — | Maximum rows to return in the first page. |
use_legacy_sql | boolean | No | — | Use legacy SQL; defaults to false (Standard SQL). |
timeout_ms | integer | No | — | Per-attempt server-side query timeout in ms. |
dry_run | boolean | No | — | Validate and estimate bytes without running. |
poll_interval_seconds | integer | No | — | Poll interval when the job is not immediately complete. |
timeout_seconds | integer | No | — | Overall wait budget for job completion. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | Echoed connection UUID. |
project_id | string | No | — | Effective project id. |
query | string | No | — | Standard SQL query to execute. |
query_parameters | json | No | — | BigQuery queryParameters list (named or positional). |
parameter_mode | string | No | — | NAMED or POSITIONAL. |
location | string | No | — | BigQuery location, e.g. US or EU. |
default_dataset | json | No | — | Default dataset {datasetId, projectId} for unqualified table names. |
max_results | integer | No | — | Maximum rows to return in the first page. |
use_legacy_sql | boolean | No | — | Use legacy SQL; defaults to false (Standard SQL). |
timeout_ms | integer | No | — | Per-attempt server-side query timeout in ms. |
dry_run | boolean | No | — | Validate and estimate bytes without running. |
poll_interval_seconds | integer | No | — | Poll interval when the job is not immediately complete. |
timeout_seconds | integer | No | — | Overall wait budget for job completion. |
rows | json | No | — | Result rows as a list of {column: value} objects. |
row_count | integer | No | — | Rows returned in this page. |
total_rows | integer | No | — | Total rows in the result set. |
schema | json | No | — | Result column schema. |
job_id | string | No | — | BigQuery job id. |
job_complete | boolean | No | — | Whether the job finished. |
cache_hit | boolean | No | — | Whether the result came from cache. |
total_bytes_processed | string | No | — | Bytes scanned by the query. |
next_page_token | string | No | — | Page token when more rows remain. |
failure_reason | string | No | — | Human-readable failure reason. |
failed_step | string | No | — | Failed logical step. |
failed_layer | json | No | — | Engine failed layer envelope. |
failed_at_state | string | No | — | State where failure occurred. |
error | string | No | — | Error message. |
error_type | string | No | — | Error class. |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | preflight | — |
preflighting | No | No | — | execute | — |
querying | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | preflight | preflighting | — |
preflighting | execute | querying | — |
querying | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "gcp.bigquery.query.run",
"initial_data": {
"connection_uuid": "value",
"query": "value"
}
}