airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] dinigo commented on a change in pull request #17592: Support for passing arguments to SqlSensor underlying hooks
Date Thu, 19 Aug 2021 12:36:11 GMT

dinigo commented on a change in pull request #17592:
URL: https://github.com/apache/airflow/pull/17592#discussion_r692068934



##########
File path: airflow/sensors/sql.py
##########
@@ -90,7 +105,7 @@ def _get_hook(self):
                 f"Connection type ({conn.conn_type}) is not supported by SqlSensor. "
                 + f"Supported connection types: {list(allowed_conn_type)}"
             )
-        return conn.get_hook()
+        return conn.get_hook(**self.hook_kwargs)

Review comment:
       I changed my mind about who should receive the destructured dict. I suppose you are
right. because then we don't risk passing an argument to `get_hook` that is later popped out
of the args, or unintendedly defined and taken out of the `get_hook` kwargs. I'll switch it
the other way around. Just like discussed in the issue




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



Mime
View raw message