eladkal commented on a change in pull request #18431:
URL: https://github.com/apache/airflow/pull/18431#discussion_r750561700



##########
File path: airflow/sensors/sql.py
##########
@@ -58,21 +61,22 @@ class SqlSensor(BaseSensorOperator):
     ui_color = '#7c7287'
 
     def __init__(
-        self, *, conn_id, sql, parameters=None, success=None, failure=None, 
fail_on_empty=False, **kwargs
+        self, *, conn_id, sql, parameters=None, success=None, failure=None, 
fail_on_empty=False, hook_params={}, **kwargs
     ):
         self.conn_id = conn_id
         self.sql = sql
         self.parameters = parameters
         self.success = success
         self.failure = failure
         self.fail_on_empty = fail_on_empty
+        self.hook_params = hook_params
         super().__init__(**kwargs)
 
     def _get_hook(self):
         conn = BaseHook.get_connection(self.conn_id)
 
         allowed_conn_type = {
-            'google_cloud_platform',
+            'gcpbigquery',

Review comment:
       We actually check for subclass of `DbApiHook` in:
   
https://github.com/apache/airflow/blob/dd410fd3c9de14e94034dcb4ccae52bbf5216199/airflow/operators/sql.py#L68-L73
   
   So we should do here the same.
   I'm not sure why you mention druid and elasticsearch as exceptions?
   
https://github.com/apache/airflow/blob/dd410fd3c9de14e94034dcb4ccae52bbf5216199/airflow/providers/apache/druid/hooks/druid.py#L131
   
   
https://github.com/apache/airflow/blob/dd410fd3c9de14e94034dcb4ccae52bbf5216199/airflow/providers/elasticsearch/hooks/elasticsearch.py#L27




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