
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
autodetectbooleanstring
avroOptionsNon-dynamic
Definitions
io.kestra.plugin.gcp.bigquery.AbstractLoad-AvroOptions
useAvroLogicalTypesbooleanstring
clusteringFieldsarray
SubTypestring
createDispositionstring
Possible Values
CREATE_IF_NEEDEDCREATE_NEVERcsvOptionsNon-dynamic
Definitions
io.kestra.plugin.gcp.bigquery.AbstractLoad-CsvOptions
allowJaggedRowsbooleanstring
allowQuotedNewLinesbooleanstring
encodingstring
fieldDelimiterstring
quotestring
skipLeadingRowsintegerstring
destinationTablestring
formatNon-dynamicstring
Possible Values
CSVJSONAVROPARQUETORCfromarray
SubTypestring
ignoreUnknownValuesbooleanstring
impersonatedServiceAccountstring
locationstring
maxBadRecordsintegerstring
projectIdstring
retryAutoNon-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
falseretryMessagesarray
SubTypestring
Default
["due to concurrent update","Retrying the job may solve the problem","Retrying may solve the problem"]retryReasonsarray
SubTypestring
Default
["rateLimitExceeded","jobBackendError","backendError","internalError","jobInternalError"]schemaobject
schemaUpdateOptionsarray
SubTypestring
Possible Values
ALLOW_FIELD_ADDITIONALLOW_FIELD_RELAXATIONscopesarray
SubTypestring
Default
["https://www.googleapis.com/auth/cloud-platform"]serviceAccountstring
timePartitioningFieldstring
timePartitioningTypestring
Default
DAYPossible Values
DAYHOURMONTHYEARwriteDispositionstring
Possible Values
WRITE_TRUNCATEWRITE_TRUNCATE_DATAWRITE_APPENDWRITE_EMPTYOutputs
destinationTablestring
jobIdstring
rowsinteger
Metrics
bad.recordscounter
Unit
recordsdurationtimer
input.bytescounter
Unit
bytesinput.filescounter
Unit
filesoutput.bytescounter
Unit
bytesoutput.rowscounter
Unit
records