
Google Cloud ExtractToGcs
CertifiedExport BigQuery table to GCS
Google Cloud ExtractToGcs
Export BigQuery table to GCS
Runs an extract job from a table or partition to one or more GCS URIs. Supports CSV/JSON/AVRO, optional compression, custom delimiter, and AVRO logical types. Prints a header row by default.
type: io.kestra.plugin.gcp.bigquery.ExtractToGcsExamples
Extract a BigQuery table to a GCS bucket
id: gcp_bq_extract_to_gcs
namespace: company.team
tasks:
- id: extract_to_gcs
type: io.kestra.plugin.gcp.bigquery.ExtractToGcs
destinationUris:
- "gs://bucket_name/filename.csv"
sourceTable: "my-project.my_dataset.my_table"
format: CSV
fieldDelimiter: ';'
printHeader: true
Properties
compression string
Compression
Optional compression; if unset, files are uncompressed
destinationUris array
Destination URIs
One or more gs:// URIs to receive the export; wildcards allowed
fieldDelimiter string
Field delimiter
Delimiter between fields; defaults to comma
format string
Export format
CSV by default; AVRO and other formats supported
impersonatedServiceAccount string
The GCP service account to impersonate
jobTimeoutMs integerstring
Job timeout (ms)
Optional timeout; BigQuery may terminate the job if exceeded
labels object
Job labels
location string
Dataset location
Optional BigQuery location for created or targeted resources. Experimental and may change; see BigQuery dataset location documentation.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
printHeader booleanstring
Print header
If true (default), include a header row in the export
projectId string
The GCP project ID
retryAuto Non-dynamic
Automatic BigQuery retry policy
Optional custom retry policy for retryable BigQuery errors. If unset, uses an exponential backoff starting at 5s (per-attempt interval capped at 60m), with a total duration of up to 15m and a maximum of 10 attempts.
Constant retry
Retry with a fixed delay between attempts.
durationRETRY_FAILED_TASKRETRY_FAILED_TASKCREATE_NEW_EXECUTION>= 1durationfalseExponential retry
Retry with exponentially increasing delays between attempts.
durationdurationRETRY_FAILED_TASKRETRY_FAILED_TASKCREATE_NEW_EXECUTION>= 1durationfalseRandom retry
Retry with a random delay within a configurable range between attempts.
durationdurationRETRY_FAILED_TASKRETRY_FAILED_TASKCREATE_NEW_EXECUTION>= 1durationfalseretryMessages array
["due to concurrent update","Retrying the job may solve the problem","Retrying may solve the problem"]Retry message substrings
Case-insensitive substrings that, if found in the error message, trigger an automatic retry
retryReasons array
["rateLimitExceeded","jobBackendError","backendError","internalError","jobInternalError"]Retry reasons
BigQuery error reasons that trigger an automatic retry; evaluated against error reason strings
scopes array
["https://www.googleapis.com/auth/cloud-platform"]The GCP scopes to be used
serviceAccount string
The GCP service account
sourceTable string
Source table
Fully-qualified table (optionally partition) to export
useAvroLogicalTypes booleanstring
Use AVRO logical types
For AVRO exports, map supported columns to AVRO logical types
Outputs
destinationUris array
Destination URIs
fileCounts array
Number of extracted files
jobId string
Job ID
sourceTable string
Source table
Metrics
duration timer
The time it took for the job to run.
output.file_counts counter
The number of files extracted to GCS.