From f1fd244b16e5fdd298ffd07679b3c345f33b5a00 Mon Sep 17 00:00:00 2001 From: Josh Fell Date: Mon, 18 Oct 2021 13:17:53 -0400 Subject: [PATCH 1/2] Replacing non-attribute template_fields for BigQueryToMsSqlOperator --- .../providers/google/cloud/transfers/bigquery_to_mssql.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/airflow/providers/google/cloud/transfers/bigquery_to_mssql.py b/airflow/providers/google/cloud/transfers/bigquery_to_mssql.py index 75f936a2db2b2..bd06b85e232bf 100644 --- a/airflow/providers/google/cloud/transfers/bigquery_to_mssql.py +++ b/airflow/providers/google/cloud/transfers/bigquery_to_mssql.py @@ -82,12 +82,7 @@ class BigQueryToMsSqlOperator(BaseOperator): :type impersonation_chain: Union[str, Sequence[str]] """ - template_fields = ( - 'dataset_id', - 'table_id', - 'mssql_table', - 'impersonation_chain', - ) + template_fields = ('source_project_dataset_table', 'mssql_table', 'impersonation_chain') def __init__( self, From 6d4ce43d44d9d5310e5b707596b5b1beb53c5a3d Mon Sep 17 00:00:00 2001 From: Josh Fell Date: Mon, 18 Oct 2021 13:31:32 -0400 Subject: [PATCH 2/2] Updating source_project_dataset_table arg in example DAG --- .../google/cloud/example_dags/example_bigquery_to_mssql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/providers/google/cloud/example_dags/example_bigquery_to_mssql.py b/airflow/providers/google/cloud/example_dags/example_bigquery_to_mssql.py index 24754cba0cafe..7b6782c2bdf9b 100644 --- a/airflow/providers/google/cloud/example_dags/example_bigquery_to_mssql.py +++ b/airflow/providers/google/cloud/example_dags/example_bigquery_to_mssql.py @@ -44,7 +44,7 @@ ) as dag: bigquery_to_mssql = BigQueryToMsSqlOperator( task_id="bigquery_to_mssql", - source_project_dataset_table=f'{DATASET_NAME}.{TABLE}', + source_project_dataset_table=f'{PROJECT_ID}.{DATASET_NAME}.{TABLE}', mssql_table=destination_table, replace=False, )