[jira] [Commented] (AIRFLOW-3142) Fix deprecated calls to BigQueryBaseCursor.run_query

2018-10-03 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AIRFLOW-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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:
us...@infra.apache.org


> 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)


[jira] [Commented] (AIRFLOW-3142) Fix deprecated calls to BigQueryBaseCursor.run_query

2018-10-02 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/AIRFLOW-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16636223#comment-16636223
 ] 

ASF GitHub Bot commented on AIRFLOW-3142:
-

jason-udacity opened a new pull request #3987: [AIRFLOW-3142] Fix deprecated 
calls to BigQueryBaseCursor.run_query
URL: https://github.com/apache/incubator-airflow/pull/3987
 
 
   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [ ] My PR addresses the following [Airflow 
Jira](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references 
them in the PR title. For example, "\[AIRFLOW-XXX\] My Airflow PR"
 - https://issues.apache.org/jira/browse/AIRFLOW-XXX
 - In case you are fixing a typo in the documentation you can prepend your 
commit with \[AIRFLOW-XXX\], code changes always need a Jira issue.
   
   ### Description
   
   - [ ] Here are some details about my PR, including screenshots of any UI 
changes:
   
   ### Tests
   
   - [ ] My PR adds the following unit tests __OR__ does not need testing for 
this extremely good reason:
   
   ### Commits
   
   - [ ] My commits all reference Jira issues in their subject lines, and I 
have squashed multiple commits if they address the same issue. In addition, my 
commits follow the guidelines from "[How to write a good git commit 
message](http://chris.beams.io/posts/git-commit/)":
 1. Subject is separated from body by a blank line
 1. Subject is limited to 50 characters (not including Jira issue reference)
 1. Subject does not end with a period
 1. Subject uses the imperative mood ("add", not "adding")
 1. Body wraps at 72 characters
 1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [ ] In case of new functionality, my PR adds documentation that describes 
how to use it.
 - When adding new operators/hooks/sensors, the autoclass documentation 
generation needs to be added.
   
   ### Code Quality
   
   - [ ] Passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
   


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:
us...@infra.apache.org


> 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)