vincbeck commented on code in PR #55694: URL: https://github.com/apache/airflow/pull/55694#discussion_r2352586369
########## 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: Instead of doing that, should we not declare them in the constructor as optional parameter. Example: `s3_staging_dir: str | None = None`? -- 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