Add IBM Db2 provider with Hook #67532
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
|
|
Note, that some fomality with announcement/DISCUSS is neede to add a new provider, following https://github.com/apache/airflow/blob/main/providers/ACCEPTING_PROVIDERS.rst |
Thanks for pointing this out. I’ve created a DISCUSS thread on the dev@airflow.apache.org mailing list for the new IBM Db2 provider, following the ACCEPTING_PROVIDERS.rst process. |
|
Quickest fix: git fetch upstream main && git rebase upstream/main
rm uv.lock && uv lock
git add uv.lock && git rebase --continue
git push --force-with-leaseAutomated nudge — ignore if you're not ready to rebase. This comment is updated in place on future |
5d470ba to
7b1633e
Compare
f523539 to
0844797
Compare
|
@jscheffl Thanks for your review, very helpful. I am working on the review comments. |
|
Was there a mailing list thread about this new provider? |
Implements initial IBM Db2 provider package with: - Db2Hook: Database connectivity with SSL support - Db2Operator: SQL execution with Jinja templating - Unit tests for both hook and operator - Example DAG demonstrating usage
- Add Db2-specific connection test SQL using SYSIBM.SYSDUMMY1 - Add cleanup task to example DAG for idempotent runs - Add autocommit=True to all DDL/DML operations in example DAG - Ensure proper transaction handling for Db2 database operations
- Implement Db2Hook extending DbApiHook for IBM Db2 connectivity - Add Db2Operator for SQL execution with parameter binding - Include comprehensive unit tests for Hook and Operator - Add documentation, example DAGs, and provider metadata - Support SSL connections, autocommit, and batch execution
Move provider from `providers/db2/` to `providers/ibm/db2/` and update package name from `apache-airflow-providers-db2` to `apache-airflow-providers-ibm-db2`. Updates all import paths, documentation, tests, and workspace configuration.
- Change conn_type to 'ibmdb2' and conn_name_attr to 'conn_id' - Add type hint for get_conn() return value - Fix: Skip None values in connection strings
Move example DAG to tests/system/ibm/db2/ and update provider metadata to not-ready/incubation/0.1.0
Add dialects docs and clean up __init__.py files.
c2999aa to
c3f046a
Compare
Description
This PR adds a new provider for IBM Db2 database support in Apache Airflow.
What: New Db2 provider package with Hook and Operator
Why: Enable Airflow users to connect to and execute queries against IBM Db2 databases
Changes
Db2Hook: ExtendsDbApiHookfor IBM Db2 connectivity with SSL supportAdded Db2Dialect: - Mentioned the SQLAlchemy dialect componentTesting
Important
🛠️ Maintainer triage note for @Amitkumar293 · by
@potiuk· 2026-07-08 15:38 UTCHelpful heads-up from the maintainers — please address before this PR can be reviewed:
Basic tests / Breeze unit tests,Non-DB tests: core / Non-DB-core::3.10:API...CLI,Non-DB tests: core / Non-DB-core::3.11:API...CLI(+20 more)). See the contributor guide.CI image checks / Static checks). See the contributor guide.CI image checks / Build documentation (--docs-only),CI image checks / Build documentation (--spellcheck-only)). See the contributor guide.MyPy providers checks,provider distributions tests / Compat 2.11.1:P3.10:,provider distributions tests / Compat 3.0.6:P3.10:(+34 more)). See the contributor guide.Full criteria: Pull Request quality criteria.
The ball is in your court — you've been assigned to this PR. Fix the above, then mark it Ready for review.
Automated triage — may be imperfect; a maintainer takes the next look.