sidshas03 commented on code in PR #55694: URL: https://github.com/apache/airflow/pull/55694#discussion_r2353846106
########## providers/amazon/src/airflow/providers/amazon/aws/hooks/athena_sql.py: ########## @@ -66,6 +66,20 @@ class AthenaSQLHook(AwsBaseHook, DbApiHook): supports_autocommit = True def __init__(self, athena_conn_id: str = default_conn_name, *args, **kwargs) -> None: + # Extract Athena-specific parameters from kwargs to avoid passing them to AwsBaseHook + # These parameters come from connection extra_dejson and hook_params + self.s3_staging_dir = kwargs.pop("s3_staging_dir", None) + self.work_group = kwargs.pop("work_group", None) + self.driver = kwargs.pop("driver", None) + self.aws_domain = kwargs.pop("aws_domain", None) + self.session_kwargs = kwargs.pop("session_kwargs", None) + self.config_kwargs = kwargs.pop("config_kwargs", None) + self.role_arn = kwargs.pop("role_arn", None) + self.assume_role_method = kwargs.pop("assume_role_method", None) + self.assume_role_kwargs = kwargs.pop("assume_role_kwargs", None) + self.aws_session_token = kwargs.pop("aws_session_token", None) + self.endpoint_url = kwargs.pop("endpoint_url", None) + Review Comment: Thanks for the input, @vincbeck @o-nikolas @jroachgolf84 — I’ve applied the constructor change in dbe991662c. What changed: - Switched AthenaSQLHook to explicit __init__ params (s3_staging_dir, work_group, driver, aws_domain, session_kwargs, config_kwargs, role_arn, assume_role_method, assume_role_kwargs, aws_session_token, endpoint_url) and kept **kwargs for compatibility. - Extract athena_conn_id before calling super().__init__(...). - Behaviour unchanged: get_conn() still honours driver/aws_domain from self → hook params > extras. - Breeze static checks + targeted Amazon Non-DB tests pass. Could you please confirm the param order/names look good and if you’d like any tweaks to the class/__init__ docstring? Happy to adjust. -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org