gcp_bigquery_select
Executes a SELECT query against BigQuery and creates a message for each row received.
inputs:
label: ""
gcp_bigquery_select:
project: "" # No default (required)
credentials_json: ""
table: "" # No default (required)
columns: [] # No default (required)
where: "" # No default (optional)
auto_replay_nacks: true
job_labels: {}
priority: ""
args_mapping: "" # No default (optional)
prefix: "" # No default (optional)
suffix: "" # No default (optional)
Once the rows from the query are exhausted, this input shuts down, allowing the pipeline to gracefully terminate (or the next input in a sequence to execute).
Examples
Word counts
Here we query the public corpus of Shakespeare’s works to generate a stream of the top 10 words that are 3 or more characters long:
input:
gcp_bigquery_select:
project: sample-project
table: bigquery-public-data.samples.shakespeare
columns:
- word
- sum(word_count) as total_count
where: length(word) >= ?
suffix: |
GROUP BY word
ORDER BY total_count DESC
LIMIT 10
args_mapping: |
root = [ 3 ]
Fields
args_mapping
An optional Bloblang mapping which should evaluate to an array of values matching in size to the number of placeholder arguments in the field where.
Type: string
# Examples:
args_mapping: root = [ "article", now().ts_format("2006-01-02") ]
auto_replay_nacks
Whether messages that are rejected (nacked) at the output level should be automatically replayed indefinitely, eventually resulting in back pressure if the cause of the rejections is persistent. If set to false these messages will instead be deleted. Disabling auto replays can greatly improve memory efficiency of high throughput streams as the original shape of the data can be discarded immediately upon consumption and mutation.
Type: bool
Default: true
credentials_json
Base64-encoded Google Service Account credentials in JSON format (optional). Use this field to authenticate with Google Cloud services. For more information about creating service account credentials, see Google’s service account documentation.
|
This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see Manage Secrets before adding it to your configuration. |
Type: string
Default: ""