[
https://issues.apache.org/jira/browse/AIRFLOW-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16637453#comment-16637453
]
ASF GitHub Bot commented on AIRFLOW-3142:
-----------------------------------------
kaxil closed pull request #3987: [AIRFLOW-3142] Fix deprecated calls to
BigQueryBaseCursor.run_query
URL: https://github.com/apache/incubator-airflow/pull/3987
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/airflow/contrib/hooks/bigquery_hook.py
b/airflow/contrib/hooks/bigquery_hook.py
index dd77df1283..f861397d9b 100644
--- a/airflow/contrib/hooks/bigquery_hook.py
+++ b/airflow/contrib/hooks/bigquery_hook.py
@@ -1487,7 +1487,7 @@ def execute(self, operation, parameters=None):
"""
sql = _bind_parameters(operation,
parameters) if parameters else operation
- self.job_id = self.run_query(sql)
+ self.job_id = self.run_query(sql=sql)
def executemany(self, operation, seq_of_parameters):
"""
diff --git a/airflow/contrib/operators/bigquery_operator.py
b/airflow/contrib/operators/bigquery_operator.py
index 9386e57c07..e1c3d2bae6 100644
--- a/airflow/contrib/operators/bigquery_operator.py
+++ b/airflow/contrib/operators/bigquery_operator.py
@@ -181,7 +181,7 @@ def execute(self, context):
conn = hook.get_conn()
self.bq_cursor = conn.cursor()
self.bq_cursor.run_query(
- self.sql,
+ sql=self.sql,
destination_dataset_table=self.destination_dataset_table,
write_disposition=self.write_disposition,
allow_large_results=self.allow_large_results,
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Fix deprecated calls to BigQueryBaseCursor.run_query
> ----------------------------------------------------
>
> Key: AIRFLOW-3142
> URL: https://issues.apache.org/jira/browse/AIRFLOW-3142
> Project: Apache Airflow
> Issue Type: Bug
> Reporter: Jason Shao
> Assignee: Jason Shao
> Priority: Minor
>
> BigQueryOperator.execute and BigQueryCursor.execute use `bql` instead of `sql`
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)