Skip to content

Make SQLAlchemy an optional dependency for JDBC and YDB providers - #72373

Merged
potiuk merged 1 commit into
apache:mainfrom
FrankYang0529:airflow-jdbc-ydb-optional-sqlalchemy
Sep 8, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
FrankYang0529:airflow-jdbc-ydb-optional-sqlalchemy

Conversation

@FrankYang0529

Copy link
Copy Markdown
Member

Followup for #59895.

for those providers where sqlalchemy is just for some feature, we should make sure that they handle lack of sqlalchemy installed - handing import error, and raising "Optional Provider Feature" exception when a method that needs sqlalchemy is callsed and sqlalchemy is not installed. Sqlalchemy should be added as "extra" sqlalchemy dependency.

Move the module-level from sqlalchemy.engine import URL into if TYPE_CHECKING: and only import it inside sqlalchemy_url.


Was generative AI tooling used to co-author this PR?
  • Yes - Claude Code

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Signed-off-by: PoAn Yang <payang@apache.org>
@potiuk
potiuk merged commit c1211c4 into apache:main Sep 8, 2026
184 checks passed
@FrankYang0529
FrankYang0529 deleted the airflow-jdbc-ydb-optional-sqlalchemy branch September 8, 2026 23:34
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants