uranusjr commented on code in PR #26102:
URL: https://github.com/apache/airflow/pull/26102#discussion_r963308962
##########
airflow/providers/google/cloud/hooks/bigquery.py:
##########
@@ -2821,6 +2824,221 @@ def _get_query_result(self) -> Dict:
return query_results
+class BigQueryHookAsync(GoogleBaseHookAsync):
+ """BigQueryHookAsync inherits from GoogleBaseHookAsync class. Interacts
with Google BigQuery"""
+
+ sync_hook_class = BigQueryHook
+
+ async def get_job_instance(
+ self, project_id: Optional[str], job_id: Optional[str], session:
ClientSession
+ ) -> Job:
+ """Get the specified job resource by job ID and project ID."""
+ with await self.service_file_as_context() as f:
+ return Job(job_id=job_id, project=project_id, service_file=f,
session=cast(Session, session))
Review Comment:
This `cast` doesn’t feel right… do you have a reference for this?
--
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]