Google Cloud BigQuery Transfer Operator to Microsoft SQL Server¶
Google Cloud BigQuery is Google Cloud’s serverless data warehouse offering. Microsoft SQL Server (MsSQL) is a relational database management system developed by Microsoft. This operator can be used to copy data from a BigQuery table to MSSQL.
Prerequisite Tasks¶
Operator¶
Copying data from one BigQuery table to another is performed with the
BigQueryToMsSqlOperator
operator.
Use Jinja templating with
source_project_dataset_table
, mssql_table
, impersonation_chain
to define values dynamically.
You may use the parameter selected_fields
to limit the fields to be copied (all fields by default),
as well as the parameter replace
to overwrite the destination table instead of appending to it.
For more information, please refer to the links above.
Transferring data¶
The following Operator copies data from a BigQuery table to MsSQL.
bigquery_to_mssql = BigQueryToMsSqlOperator(
task_id="bigquery_to_mssql",
source_project_dataset_table=f"{PROJECT_ID}.{DATASET_NAME}.{TABLE}",
mssql_table=destination_table,
replace=False,
)
Reference¶
For further information, look at: