BigQueryToBigQueryOperator

Google

Copies data from one BigQuery table to another.

View on GitHub

Last Updated: Feb. 11, 2023

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_tablesRequiredOne 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_tableRequiredThe destination BigQuery table. Format is: (project:|project.).
(templated)
write_dispositionThe write disposition if the table already exists.
create_dispositionThe create disposition if the table doesn’t exist.
gcp_conn_id(Optional) The connection ID used to connect to Google Cloud.
delegate_toThe 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.
labelsa dictionary containing labels for the job/query, passed to BigQuery
encryption_configuration[Optional] Custom encryption configuration (e.g., Cloud KMS keys). Example: encryption_configuration = { "kmsKeyName": "projects/testp/locations/us/keyRings/test-kr/cryptoKeys/test-key" }
locationThe geographic location of the job. You must specify the location to run the job if the location to run a job is not in the US or the EU multi-regional location or the location is in a single region (for example, us-central1). For more details check: https://cloud.google.com/bigquery/docs/locations#specifying_your_location
impersonation_chainOptional 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 information on how to use this operator, take a look at the guide: Operator

See also

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

Was this page helpful?