Make sqlalchemy an optional dependency for Impala provider#60062
Make sqlalchemy an optional dependency for Impala provider#60062potiuk merged 5 commits intoapache:mainfrom
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
Srabasti
left a comment
There was a problem hiding this comment.
Line 73 should be referencing "sqlalchemy>=1.4.49" instead of "sqlalchemy>=1.4.0".
Happy New Year!
|
Updated the minimum SQLAlchemy version to 1.4.49 as suggested. Thanks! |
providers/apache/impala/src/airflow/providers/apache/impala/hooks/impala.py
Outdated
Show resolved
Hide resolved
providers/apache/impala/src/airflow/providers/apache/impala/hooks/impala.py
Outdated
Show resolved
Hide resolved
potiuk
left a comment
There was a problem hiding this comment.
Approve but there is one NIT to take a look.
9c29697 to
de578e5
Compare
|
One more small nit - after @Prab-27 comment I realized that kerberos one could be fixed as well :) |
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
) * Make sqlalchemy an optional dependency for Impala provider * Align minimum SQLAlchemy version with Airflow requirements * Refactor ImpalaHook to inline sqlalchemy import logic and update dev dependencies * Use optional dependencies in dev group to avoid version duplication Co-authored-by: Jarek Potiuk <jarek@potiuk.com> --------- Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
) * Make sqlalchemy an optional dependency for Impala provider * Align minimum SQLAlchemy version with Airflow requirements * Refactor ImpalaHook to inline sqlalchemy import logic and update dev dependencies * Use optional dependencies in dev group to avoid version duplication Co-authored-by: Jarek Potiuk <jarek@potiuk.com> --------- Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
) * Make sqlalchemy an optional dependency for Impala provider * Align minimum SQLAlchemy version with Airflow requirements * Refactor ImpalaHook to inline sqlalchemy import logic and update dev dependencies * Use optional dependencies in dev group to avoid version duplication Co-authored-by: Jarek Potiuk <jarek@potiuk.com> --------- Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
) * Make sqlalchemy an optional dependency for Impala provider * Align minimum SQLAlchemy version with Airflow requirements * Refactor ImpalaHook to inline sqlalchemy import logic and update dev dependencies * Use optional dependencies in dev group to avoid version duplication Co-authored-by: Jarek Potiuk <jarek@potiuk.com> --------- Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Closes: #59898
Related: #59895
What does this PR do?
This PR makes
sqlalchemyan optional dependency for the Impala provider.The import in
ImpalaHookis now wrapped in atry/exceptblock, and it raises anAirflowOptionalProviderFeatureExceptionifsqlalchemyis not installed when accessed.Why is this needed?
This aligns the Impala provider with Airflow's standard for task isolation and core dependency removal. By making
sqlalchemyoptional, we ensure that the provider can run in lightweight environments wheresqlalchemyis not strictly required, unless the user explicitly needs features that depend on it (e.g.,get_urior specific SQL connection helpers).^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.