dabla commented on code in PR #42891:
URL: https://github.com/apache/airflow/pull/42891#discussion_r1800483211
##########
airflow/operators/generic_transfer.py:
##########
@@ -68,13 +76,17 @@ def __init__(
self.sql = sql
self.destination_table = destination_table
self.source_conn_id = source_conn_id
+ self.source_hook_params = source_hook_params
self.destination_conn_id = destination_conn_id
+ self.destination_hook_params = destination_hook_params
self.preoperator = preoperator
self.insert_args = insert_args or {}
def execute(self, context: Context):
- source_hook = BaseHook.get_hook(self.source_conn_id)
- destination_hook = BaseHook.get_hook(self.destination_conn_id)
+ source_hook = BaseHook.get_hook(conn_id=self.source_conn_id,
hook_params=self.source_hook_params)
Review Comment:
Hello Jarek, do you want me to do both a) and b)? The b option is quite
simple imho, I just redefined the same get_hook method in the GenericTransfer
to make it backward compatible. I thought about doing this but then I realised
this operator was part of airflow code base, now that it will be moved in
standard provider that would indeed become an 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]