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 2021/11/16 03:13:54 UTC

[GitHub] [airflow] david30907d commented on a change in pull request #19571: :pencil: (providers_google) add a location check

david30907d commented on a change in pull request #19571:
URL: https://github.com/apache/airflow/pull/19571#discussion_r749867751



##########
File path: airflow/providers/google/cloud/hooks/bigquery.py
##########
@@ -2630,6 +2630,11 @@ def run_query(self, *args, **kwargs) -> str:
             stacklevel=3,
         )
         return self.hook.run_query(*args, **kwargs)
+    
+    def get_records(self, sql, parameters=None):
+        if self.location is None:
+            raise Exception("Need to specify location when instantiating BigQueryHook, otherwise it would result in Job Not Found error!")

Review comment:
       yea `location=None` works for other function and seems to me that it only fails when invoking `get_records()` ...
   btw I might need to postpone this PR, will try to finish it by the end of Nov
   will ping @uranusjr for help 😂 




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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org