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? |
0844797 to
23f0976
Compare
Yes, I opened a mailing list thread for the new provider last week. |
|
@jscheffl Fixed the provider structure per your feedback: added dialect support, restructured the docs, removed operators, and added UI connection fields in 'provider.yaml'. Thank you for the detailed review. Could you please take another look when you have a chance? |
Can you share a link to the mailing list thread? |
@eladkal |
23f0976 to
951db05
Compare
16837e2 to
d42e710
Compare
|
Can you please resolve comments if your think they are completed? |
d42e710 to
6b9a3e7
Compare
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.
- Extract get_conn_str() method for better separation - Move metadata methods to Dialect with pure SQL
cc77413 to
ef25c93
Compare
|
@dabla Could you please review it again? I've made the changes you suggested. I appreciate your help and thank you for your time. |
Hi @jscheffl |
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