You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/04/14 07:31:17 UTC

[GitHub] [airflow] edejong commented on a change in pull request #8273: BigQueryCheckOperator location fix

edejong commented on a change in pull request #8273: BigQueryCheckOperator location fix
URL: https://github.com/apache/airflow/pull/8273#discussion_r407923819
 
 

 ##########
 File path: airflow/providers/google/cloud/hooks/bigquery.py
 ##########
 @@ -2442,10 +2442,17 @@ def next(self) -> Union[List, None]:
             if self.all_pages_loaded:
                 return None
 
-            query_results = (self.service.jobs().getQueryResults(
-                projectId=self.project_id,
-                jobId=self.job_id,
-                pageToken=self.page_token).execute(num_retries=self.num_retries))
+            if self.location:
+                query_results = (self.service.jobs().getQueryResults(
+                    projectId=self.project_id,
+                    jobId=self.job_id,
+                    location=self.location,
+                    pageToken=self.page_token).execute(num_retries=self.num_retries))
+            else:
+                query_results = (self.service.jobs().getQueryResults(
+                    projectId=self.project_id,
+                    jobId=self.job_id,
+                    pageToken=self.page_token).execute(num_retries=self.num_retries))
 
 Review comment:
   Not sure, I noticed this highly verbose pattern in the rest of the BigQuery related classes (just look at any other mention of `location` in `big_query_hook.py`) so I just followed it's style. I will check it and update if needed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services