Google BigQuery
connector.google_bigquery · data, database
Run SQL queries, stream rows into tables, read table data and inspect datasets, tables and jobs.
Vendor API documentation: https://cloud.google.com/bigquery/docs/reference/rest
Authentication
| Method | Credential kind | Auth kind | Fields | Test request |
|---|---|---|---|---|
| Google account (OAuth2) | google_bigquery/oauth2 | oauth2_auth_code | client_id, client_secret (secret) | yes |
| Google service account | google_bigquery/service_account | jwt_service_account | client_email, private_key (secret), subject | yes |
Actions
Node type connector.google_bigquery. Choose a resource and an operation; each operation has its own parameters.
Query
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Execute a query | query.execute | writes | yes | 5 |
| Get query results | query.get_results | reads | yes | 1 |
Execute a query
Operation query.execute. Runs a SQL query and returns one item per result row (column name to value; values are returned as BigQuery encodes them, numbers and timestamps as strings). Statements without a result set (DML, DDL) and dry runs return the query response instead.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
project | resource_locator | yes | Values from lookup projects. | ||
sql | code | yes | SQL query. | ||
use_legacy_sql | boolean | false | Use legacy SQL. | ||
default_dataset | resource_locator | Dataset assumed for unqualified table names. Depends on project. Values from lookup datasets. | |||
location | string | Location of the referenced datasets when it is not US or EU multi-region. | |||
query_parameters | json | Array of BigQuery QueryParameter objects for @name or ? placeholders. | |||
parameter_mode | options | "NAMED" | One of NAMED, POSITIONAL. | ||
maximum_bytes_billed | string | Fail the query instead of billing more than this many bytes. | |||
use_query_cache | boolean | true | |||
dry_run | boolean | false | Validate the query and estimate bytes processed without running it. | ||
labels | json | Object of job labels. | |||
timeout_ms | number | 60000 | How long each request waits for the query to finish. | ||
return_all | boolean | false | |||
limit | number | 50 | return_all = false | ||
output_mode | options | "rows" | One of rows, raw. |
Get query results
Operation query.get_results. Reads the result rows of an earlier query job.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
project | resource_locator | yes | Values from lookup projects. | ||
job_id | string | yes | Job ID. | ||
location | string | Location of the job when it is not US or EU multi-region. | |||
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Job
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Get a job | job.get | reads | 1 | |
| List jobs | job.list | reads | yes | 1 |
| Cancel a job | job.cancel | writes | 1 |
Get a job
Operation job.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
project | resource_locator | yes | Values from lookup projects. | ||
job_id | string | yes | Job ID. | ||
location | string | Location of the job when it is not US or EU multi-region. |
List jobs
Operation job.list.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
project | resource_locator | yes | Values from lookup projects. | ||
state_filter | multi_options | One of done, pending, running. | |||
all_users | boolean | false | |||
min_creation_time | string | Milliseconds since the epoch. | |||
max_creation_time | string | Milliseconds since the epoch. | |||
projection | options | "minimal" | One of minimal, full. | ||
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Cancel a job
Operation job.cancel.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
project | resource_locator | yes | Values from lookup projects. | ||
job_id | string | yes | Job ID. | ||
location | string | Location of the job when it is not US or EU multi-region. |
Table
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Insert rows (all input items) | table.insert_rows | writes | 2 | |
| Insert a row per item | table.insert_row | writes | 3 | |
| List table rows | table.list_rows | reads | yes | 2 |
| Get a table | table.get | reads | 2 | |
| List tables | table.list | reads | yes | 1 |
Insert rows (all input items)
Operation table.insert_rows. Streams every input item as one row (its JSON fields are the columns), in batches of up to 500 rows per request. Outputs one result per batch with any per-row insert errors.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
project | resource_locator | yes | Values from lookup projects. | ||
dataset | resource_locator | yes | Depends on project. Values from lookup datasets. | ||
table | resource_locator | yes | Depends on project, dataset. Values from lookup tables. | ||
batch_size | number | 500 | Rows per request (Google recommends at most 500). | ||
insert_id_field | string | Deduplication ID field. Input field whose value is sent as insertId for best-effort deduplication. | |||
skip_invalid_rows | boolean | false | Insert the valid rows even when some rows are invalid. | ||
ignore_unknown_values | boolean | false | Drop fields that are not in the table schema instead of failing. | ||
template_suffix | string | Insert into the table named <table><suffix>, created from the table’s schema. | |||
trace_id | string |
Insert a row per item
Operation table.insert_row. Streams one row per input item, built from selected input fields, a list of column/value pairs, or a JSON object.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
project | resource_locator | yes | Values from lookup projects. | ||
dataset | resource_locator | yes | Depends on project. Values from lookup datasets. | ||
table | resource_locator | yes | Depends on project, dataset. Values from lookup tables. | ||
data_mode | options | "auto" | One of auto, define, json. | ||
columns | string | data_mode = auto | Comma separated input fields to send. Empty sends all fields. | ||
values | fixed_collection | data_mode = define | Column values. | ||
values.fieldId | string | Column. | |||
values.fieldValue | string | Value. | |||
row | json | data_mode = json | |||
insert_id | string | Deduplication ID. | |||
skip_invalid_rows | boolean | false | Insert the valid rows even when some rows are invalid. | ||
ignore_unknown_values | boolean | false | Drop fields that are not in the table schema instead of failing. | ||
template_suffix | string | Insert into the table named <table><suffix>, created from the table’s schema. | |||
trace_id | string |
List table rows
Operation table.list_rows. Reads rows straight from a table (no query cost) as column name to value items.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
project | resource_locator | yes | Values from lookup projects. | ||
dataset | resource_locator | yes | Depends on project. Values from lookup datasets. | ||
table | resource_locator | yes | Depends on project, dataset. Values from lookup tables. | ||
selected_fields | string | Comma separated columns to return. | |||
start_index | number | Zero-based row to start at. | |||
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Get a table
Operation table.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
project | resource_locator | yes | Values from lookup projects. | ||
dataset | resource_locator | yes | Depends on project. Values from lookup datasets. | ||
table | resource_locator | yes | Depends on project, dataset. Values from lookup tables. |
List tables
Operation table.list.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
project | resource_locator | yes | Values from lookup projects. | ||
dataset | resource_locator | yes | Depends on project. Values from lookup datasets. | ||
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Dataset
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Get a dataset | dataset.get | reads | 1 | |
| List datasets | dataset.list | reads | yes | 1 |
Get a dataset
Operation dataset.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
project | resource_locator | yes | Values from lookup projects. | ||
dataset | resource_locator | yes | Depends on project. Values from lookup datasets. |
List datasets
Operation dataset.list.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
project | resource_locator | yes | Values from lookup projects. | ||
all | boolean | false | Include hidden datasets. | ||
filter | string | Label filter. | |||
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Lookups
Lookups fill dropdowns and resource pickers in the editor from the vendor API.
| Lookup | Depends on | Search | Description |
|---|---|---|---|
projects | client-side | {{ item.projectReference.projectId }} | |
datasets | project | client-side | {{ item.location }} |
tables | project, dataset | client-side | {{ item.type }} |
Import
Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.
| Source type | Version range | Status | Fixtures |
|---|---|---|---|
n8n-nodes-base.googleBigQuery | >=1 <2 | unverified | |
n8n-nodes-base.googleBigQuery | >=2 <3 | unverified |
Provenance
Written from the vendor’s documentation:
- https://cloud.google.com/bigquery/docs/reference/rest
- https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query
- https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/getQueryResults
- https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/get
- https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/list
- https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/cancel
- https://cloud.google.com/bigquery/docs/reference/rest/v2/tabledata/insertAll
- https://cloud.google.com/bigquery/docs/reference/rest/v2/tabledata/list
- https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/get
- https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/list
- https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/list
- https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/get
- https://cloud.google.com/bigquery/docs/reference/rest/v2/projects/list
- https://cloud.google.com/bigquery/docs/reference/rest/v2/QueryParameter
- https://cloud.google.com/bigquery/docs/streaming-data-into-bigquery
- https://cloud.google.com/bigquery/docs/error-messages
- https://cloud.google.com/bigquery/quotas
- https://cloud.google.com/bigquery/docs/authentication
- https://www.googleapis.com/discovery/v1/apis/bigquery/v2/rest
- https://developers.google.com/identity/protocols/oauth2/web-server
- https://developers.google.com/identity/protocols/oauth2/service-account