BigQueryToBigQueryOperator

Google

Copies data from one BigQuery table to another.

View Source

Last Updated: Oct. 20, 2020

Access Instructions

Install the Google provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

source_project_dataset_tableslist|stringOne or more dotted (project:|project.). BigQuery tables to use as the source data. If is not included, project will be the project defined in the connection json. Use a list if there are multiple source tables. (templated)
destination_project_dataset_tablestrThe destination BigQuery table. Format is: (project:|project.).
(templated)
write_dispositionstrThe write disposition if the table already exists.
create_dispositionstrThe create disposition if the table doesn't exist.
gcp_conn_idstr(Optional) The connection ID used to connect to Google Cloud.
bigquery_conn_idstr(Deprecated) The connection ID used to connect to Google Cloud. This parameter has been deprecated. You should pass the gcp_conn_id parameter instead.
delegate_tostrThe account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.
labelsdicta dictionary containing labels for the job/query, passed to BigQuery
encryption_configurationdict[Optional] Custom encryption configuration (e.g., Cloud KMS keys). Example:encryption_configuration = { "kmsKeyName": "projects/testp/locations/us/keyRings/test-kr/cryptoKeys/test-key" }
locationstrThe location used for the operation.
impersonation_chainUnion[str, Sequence[str]]Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

Documentation

Copies data from one BigQuery table to another.

See also

For more details about these parameters: https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.copy

Was this page helpful?