LoadFromGcs
LoadFromGcs
yaml
type: "io.kestra.plugin.gcp.bigquery.LoadFromGcs"Examples
yaml
id: gcp_bq_load_from_gcs
namespace: company.team
tasks:
- id: http_download
type: io.kestra.plugin.core.http.Download
uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/orders.csv
- id: csv_to_ion
type: io.kestra.plugin.serdes.csv.CsvToIon
from: "{{ outputs.http_download.uri }}"
header: true
- id: ion_to_avro
type: io.kestra.plugin.serdes.avro.IonToAvro
from: "{{ outputs.csv_to_ion.uri }}"
schema: |
{
"type": "record",
"name": "Order",
"namespace": "com.example.order",
"fields": [
{"name": "order_id", "type": "int"},
{"name": "customer_name", "type": "string"},
{"name": "customer_email", "type": "string"},
{"name": "product_id", "type": "int"},
{"name": "price", "type": "double"},
{"name": "quantity", "type": "int"},
{"name": "total", "type": "double"}
]
}
- id: load_from_gcs
type: io.kestra.plugin.gcp.bigquery.LoadFromGcs
from:
- "{{ outputs.ion_to_avro.uri }}"
destinationTable: "my_project.my_dataset.my_table"
format: AVRO
avroOptions:
useAvroLogicalTypes: true
yaml
id: gcp_bq_load_files_test
namespace: company.team
tasks:
- id: load_files_test
type: io.kestra.plugin.gcp.bigquery.LoadFromGcs
destinationTable: "myDataset.myTable"
ignoreUnknownValues: true
schema:
fields:
- name: colA
type: STRING
- name: colB
type: NUMERIC
- name: colC
type: STRING
format: CSV
csvOptions:
allowJaggedRows: true
encoding: UTF-8
fieldDelimiter: ","
from:
- gs://myBucket/myFile.csv
Properties
autodetect booleanstring
avroOptions Non-dynamic
Definitions
io.kestra.plugin.gcp.bigquery.AbstractLoad-AvroOptions
useAvroLogicalTypesbooleanstring
clusteringFields array
SubTypestring
createDisposition string
Possible Values
CREATE_IF_NEEDEDCREATE_NEVERcsvOptions Non-dynamic
Definitions
io.kestra.plugin.gcp.bigquery.AbstractLoad-CsvOptions
allowJaggedRowsbooleanstring
allowQuotedNewLinesbooleanstring
encodingstring
fieldDelimiterstring
quotestring
skipLeadingRowsintegerstring
destinationTable string
format Non-dynamicstring
Possible Values
CSVJSONAVROPARQUETORCfrom array
SubTypestring
ignoreUnknownValues booleanstring
impersonatedServiceAccount string
location string
maxBadRecords integerstring
projectId string
retryAuto Non-dynamic
Definitions
io.kestra.core.models.tasks.retrys.Constant
interval*Requiredstring
Format
durationtype*Requiredobject
behaviorstring
Default
RETRY_FAILED_TASKPossible Values
RETRY_FAILED_TASKCREATE_NEW_EXECUTIONmaxAttemptsinteger
Minimum
>= 1maxDurationstring
Format
durationwarningOnRetryboolean
Default
falseio.kestra.core.models.tasks.retrys.Exponential
interval*Requiredstring
Format
durationmaxInterval*Requiredstring
Format
durationtype*Requiredobject
behaviorstring
Default
RETRY_FAILED_TASKPossible Values
RETRY_FAILED_TASKCREATE_NEW_EXECUTIONdelayFactornumber
maxAttemptsinteger
Minimum
>= 1maxDurationstring
Format
durationwarningOnRetryboolean
Default
falseio.kestra.core.models.tasks.retrys.Random
maxInterval*Requiredstring
Format
durationminInterval*Requiredstring
Format
durationtype*Requiredobject
behaviorstring
Default
RETRY_FAILED_TASKPossible Values
RETRY_FAILED_TASKCREATE_NEW_EXECUTIONmaxAttemptsinteger
Minimum
>= 1maxDurationstring
Format
durationwarningOnRetryboolean
Default
falseretryMessages array
SubTypestring
Default
["due to concurrent update","Retrying the job may solve the problem","Retrying may solve the problem"]retryReasons array
SubTypestring
Default
["rateLimitExceeded","jobBackendError","backendError","internalError","jobInternalError"]schema object
schemaUpdateOptions array
SubTypestring
Possible Values
ALLOW_FIELD_ADDITIONALLOW_FIELD_RELAXATIONscopes array
SubTypestring
Default
["https://www.googleapis.com/auth/cloud-platform"]serviceAccount string
timePartitioningField string
timePartitioningType string
Default
DAYPossible Values
DAYHOURMONTHYEARwriteDisposition string
Possible Values
WRITE_TRUNCATEWRITE_TRUNCATE_DATAWRITE_APPENDWRITE_EMPTYOutputs
destinationTable string
jobId string
rows integer
Metrics
bad.records counter
Unit
recordsduration timer
input.bytes counter
Unit
bytesinput.files counter
Unit
filesoutput.bytes counter
Unit
bytesoutput.rows counter
Unit
records