You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/08/16 07:26:05 UTC
[GitHub] [airflow] uranusjr commented on a diff in pull request #33427: Add sql_hook_params parameter to S3ToSqlOperator
uranusjr commented on code in PR #33427:
URL: https://github.com/apache/airflow/pull/33427#discussion_r1295486106
##########
airflow/providers/amazon/aws/transfers/s3_to_sql.py:
##########
@@ -120,7 +124,7 @@ def execute(self, context: Context) -> None:
@cached_property
def db_hook(self):
self.log.debug("Get connection for %s", self.sql_conn_id)
- hook = BaseHook.get_hook(self.sql_conn_id)
+ hook = BaseHook.get_hook(self.sql_conn_id, hook_params=self.sql_hook_params)
Review Comment:
You can’t do this because providers needs to support older Airflow versions.
##########
airflow/providers/amazon/aws/transfers/s3_to_sql.py:
##########
@@ -120,7 +124,7 @@ def execute(self, context: Context) -> None:
@cached_property
def db_hook(self):
self.log.debug("Get connection for %s", self.sql_conn_id)
- hook = BaseHook.get_hook(self.sql_conn_id)
+ hook = BaseHook.get_hook(self.sql_conn_id, hook_params=self.sql_hook_params)
Review Comment:
You can’t do this because providers needs to support older Airflow versions.
--
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