Copy a BigQuery table or partition to another one.
type: "io.kestra.plugin.gcp.bigquery.Copy"
Examples
id: gcp_bq_copy
namespace: company.team
tasks:
- id: copy
type: io.kestra.plugin.gcp.bigquery.Copy
operationType: COPY
sourceTables:
- "my_project.my_dataset.my_table$20130908"
destinationTable: "my_project.my_dataset.my_table"
Properties
destinationTable *Requiredstring
The destination table.
If not provided a new table is created.
sourceTables *Requiredarray
The source tables.
Can be table or partitions.
createDisposition string
CREATE_IF_NEEDED
CREATE_NEVER
Whether the job is allowed to create tables.
dryRun booleanstring
false
Whether the job has to be dry run or not.
A valid query will mostly return an empty response with some processing statistics, while an invalid query will return the same error as it would if it were an actual run.
impersonatedServiceAccount string
The GCP service account to impersonate.
jobTimeout string
duration
Job timeout.
If this time limit is exceeded, BigQuery may attempt to terminate the job.
labels object
The labels associated with this job.
You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
location string
The geographic location where the dataset should reside.
This property is experimental and might be subject to change or removed.
See Dataset Location
operationType string
COPY
SNAPSHOT
RESTORE
CLONE
Sets the supported operation types in table copy job.
COPY
: The source and destination table have the same table type.SNAPSHOT
: The source table type is TABLE and the destination table type is SNAPSHOT.RESTORE
: The source table type is SNAPSHOT and the destination table type is TABLE.CLONE
: The source and destination table have the same table type, but only bill for unique data.
projectId string
The GCP project ID.
retryAuto Non-dynamicConstantExponentialRandom
Automatic retry for retryable BigQuery exceptions.
Some exceptions (especially rate limit) are not retried by default by BigQuery client, we use by default a transparent retry (not the kestra one) to handle this case. The default values are exponential of 5 seconds for a maximum of 15 minutes and ten attempts
retryMessages array
["due to concurrent update","Retrying the job may solve the problem","Retrying may solve the problem"]
The messages which would trigger an automatic retry.
Message is tested as a substring of the full message, and is case insensitive.
retryReasons array
["rateLimitExceeded","jobBackendError","backendError","internalError","jobInternalError"]
The reasons which would trigger an automatic retry.
scopes array
["https://www.googleapis.com/auth/cloud-platform"]
The GCP scopes to be used.
serviceAccount string
The GCP service account.
writeDisposition string
WRITE_TRUNCATE
WRITE_TRUNCATE_DATA
WRITE_APPEND
WRITE_EMPTY
The action that should occur if the destination table already exists.
Outputs
jobId string
The job id
Metrics
duration timer
The time it took for the job to run.
num.child.jobs counter
The number of child jobs executed.
Definitions
io.kestra.core.models.tasks.retrys.Constant
interval *Requiredstring
duration
type *Requiredobject
behavior string
RETRY_FAILED_TASK
RETRY_FAILED_TASK
CREATE_NEW_EXECUTION
maxAttempts integer
>= 1
maxDuration string
duration
warningOnRetry boolean
false
io.kestra.core.models.tasks.retrys.Random
maxInterval *Requiredstring
duration
minInterval *Requiredstring
duration
type *Requiredobject
behavior string
RETRY_FAILED_TASK
RETRY_FAILED_TASK
CREATE_NEW_EXECUTION
maxAttempts integer
>= 1
maxDuration string
duration
warningOnRetry boolean
false
io.kestra.core.models.tasks.retrys.Exponential
interval *Requiredstring
duration
maxInterval *Requiredstring
duration
type *Requiredobject
behavior string
RETRY_FAILED_TASK
RETRY_FAILED_TASK
CREATE_NEW_EXECUTION
delayFactor number
maxAttempts integer
>= 1
maxDuration string
duration
warningOnRetry boolean
false