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



##########
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:
       Instead of failing on runtime, can we instead detect this in `__init__` 
and fail the entire DAG when `location` is invalid? Or is `location=None` a 
valid value for certain use cases?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to