Google Cloud Load

Google Cloud Load

Certified

Load an internal file into BigQuery

Streams a file from Kestra internal storage to a BigQuery load job. Fails on empty files by default (failedOnEmpty true).

yaml
type: io.kestra.plugin.gcp.bigquery.Load

Load an csv file from an input file

yaml
id: gcp_bq_load
namespace: company.team

tasks:
  - id: load
    type: io.kestra.plugin.gcp.bigquery.Load
    from: "{{ inputs.file }}"
    destinationTable: "my-project.my_dataset.my_table"
    format: CSV
    csvOptions:
      fieldDelimiter: ";"
Properties

Autodetect source options

Experimental. Lets BigQuery infer schema/options for CSV or JSON sources.

Avro parsing options

Definitions
useAvroLogicalTypesbooleanstring

If format is set to AVRO, you can interpret logical types into their corresponding types (such as TIMESTAMP) instead of only using their raw types (such as INTEGER)

The value may be null.

SubTypestring

Clustering fields

Possible Values
CREATE_IF_NEEDEDCREATE_NEVER

Create disposition

Whether the job may create the destination table

CSV parsing options

Definitions
allowJaggedRowsbooleanstring

Whether BigQuery should accept rows that are missing trailing optional columns

If true, BigQuery treats missing trailing columns as null values. If {@code false}, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. By default, rows with missing trailing columns are considered bad records.

allowQuotedNewLinesbooleanstring

Whether BigQuery should allow quoted data sections that contain newline characters in a CSV file

By default quoted newline are not allowed.

encodingstring

The character encoding of the data

The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values set in {@link #setQuote(String)} and {@link #setFieldDelimiter(String)}.

fieldDelimiterstring

The separator for fields in a CSV file

BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').

quotestring

The value that is used to quote data sections in a CSV file

BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set {@link #setAllowQuotedNewLines(boolean)} property to {@code true}.

skipLeadingRowsintegerstring

The number of rows at the top of a CSV file that BigQuery will skip when reading the data

The default value is 0. This property is useful if you have header rows in the file that should be skipped.

Destination table

Target table for the load job; creation depends on createDisposition

Defaulttrue

Fail on empty file

If true (default), raises an error when the input file has zero bytes

Possible Values
CSVJSONAVROPARQUETORC

Source format

Source file URI

Kestra internal storage URI for the file to load

Ignore unknown values

If true, extra columns are skipped; if false, extra columns count as bad records. Default is false.

The GCP service account to impersonate

Dataset location

Optional BigQuery location for created or targeted resources. Experimental and may change; see BigQuery dataset location documentation.

Max bad records

Number of bad records allowed before the job fails; default 0

Reference (ref) of the pluginDefaults to apply to this task.

The GCP project ID

Automatic BigQuery retry policy

Optional custom retry policy for retryable BigQuery errors. If unset, uses an exponential backoff starting at 5s, up to 15m, max 10 attempts.

Definitions

Retry with a fixed delay between attempts.

interval*Requiredstring
Formatduration
type*Requiredobject
behaviorstring
DefaultRETRY_FAILED_TASK
Possible Values
RETRY_FAILED_TASKCREATE_NEW_EXECUTION
maxAttemptsinteger
Minimum>= 1
maxDurationstring
Formatduration
warningOnRetryboolean
Defaultfalse

Retry with exponentially increasing delays between attempts.

interval*Requiredstring
Formatduration
maxInterval*Requiredstring
Formatduration
type*Requiredobject
behaviorstring
DefaultRETRY_FAILED_TASK
Possible Values
RETRY_FAILED_TASKCREATE_NEW_EXECUTION
delayFactornumber
maxAttemptsinteger
Minimum>= 1
maxDurationstring
Formatduration
warningOnRetryboolean
Defaultfalse

Retry with a random delay within a configurable range between attempts.

maxInterval*Requiredstring
Formatduration
minInterval*Requiredstring
Formatduration
type*Requiredobject
behaviorstring
DefaultRETRY_FAILED_TASK
Possible Values
RETRY_FAILED_TASKCREATE_NEW_EXECUTION
maxAttemptsinteger
Minimum>= 1
maxDurationstring
Formatduration
warningOnRetryboolean
Defaultfalse
SubTypestring
Default["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

SubTypestring
Default["rateLimitExceeded","jobBackendError","backendError","internalError","jobInternalError"]

Retry reasons

BigQuery error reasons that trigger an automatic retry; evaluated against error reason strings

Destination schema

Table schema definition; may be omitted when loading into an existing table or supported backup formats

SubTypestring
Possible Values
ALLOW_FIELD_ADDITIONALLOW_FIELD_RELAXATION

Schema update options

Experimental. Applies only with WRITE_APPEND or partitioned WRITE_TRUNCATE destinations.

SubTypestring
Default["https://www.googleapis.com/auth/cloud-platform"]

The GCP scopes to be used

The GCP service account

Time partitioning field

DefaultDAY
Possible Values
DAYHOURMONTHYEAR

Time partitioning type

Defaults to DAY when partitioning is configured

Possible Values
WRITE_TRUNCATEWRITE_TRUNCATE_DATAWRITE_APPENDWRITE_EMPTY

Write disposition

Action if destination exists (e.g., WRITE_APPEND, WRITE_TRUNCATE)

Destination table

The job id

Output rows count

Unitrecords

the number of bad records reported in a job.

The time it took for the task to run.

Unitbytes

The number of bytes of source data in a load job.

Unitfiles

The number of source files in a load job.

Unitbytes

The size of the data loaded by a load job so far, in bytes.

Unitrecords

The number of rows loaded by a load job so far.