Skip to main content

Apache Airflow provider for IBM Db2 (Hook + Operators, ibm_db_dbi with pyodbc fallback)

Project description

airflow-provider-ibm-db2

PyPI version Python Versions License: MIT CI

Apache Airflow provider to connect to IBM Db2 using ibm_db_dbi (native) with a fallback to pyodbc.
Includes basic Hook and Operators, an example DAG, and unit tests.

Status: Initial MVP — designed to evolve with your feedback and contributions.


✨ Features

  • Db2Hook with driver auto-detection: ibm_db_dbipyodbc (fallback).
  • Db2SqlOperator to execute parameterized SQL (based on SQLExecuteQueryOperator).
  • Db2StoredProcedureOperator to invoke CALL schema.proc(?,?).
  • Db2CheckOperator for data quality checks (counts/values).
  • bulk_load() via SYSPROC.ADMIN_CMD('LOAD/IMPORT ...') (if the user has privileges).
  • Example DAG and tests with pytest.

⚡ Installation (editable)

pip install -e .[dev]

🔧 Airflow Connection Setup

Create a Connection with ID db2_default:

  • Conn Type: Db2 (free text) or Generic

  • Host: hostname | Port: 50000

  • Schema: DBNAME | Login: user | Password: ******

  • Optional Extra (JSON):

{
  "ssl": true,
  "currentSchema": "DB2ADMIN",
  "securityMechanism": "13"
}

🚀 Quick Start

Check out the example DAG:
src/airflow_provider_ibm_db2/example_dags/example_db2_dag.py


🗺️ Short-term Roadmap

  • Transfer operators (Db2 → Parquet, Db2 → Postgres)
  • Sensible defaults for isolation level and retries
  • Compatibility matrix (DB2 LUW 11.1/11.5, Python 3.9–3.12, Airflow ≥2.7)

📜 License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

airflow_provider_ibm_db2-0.1.2.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

airflow_provider_ibm_db2-0.1.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file airflow_provider_ibm_db2-0.1.2.tar.gz.

File metadata

File hashes

Hashes for airflow_provider_ibm_db2-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0ff20b122885e2415d75dc8074bf0b203c1a5fc1c9c18e5735ede813b87bb2f3
MD5 3a0eba21746ee7ffa226bbd569499cb6
BLAKE2b-256 0e9fe66fc1ba52015329c7ebc3e74ca3d693eb49ba36003c79f8b6b51da78cae

See more details on using hashes here.

File details

Details for the file airflow_provider_ibm_db2-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for airflow_provider_ibm_db2-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 76c8245fb462d99bfa758aa2efbefeb92205bf65aec1e4ad8b1342a86812223d
MD5 a7be26e4461724594154f622f4f80a40
BLAKE2b-256 836df8a6cb2467c5894236ddf3943d92edb7e56c2c3a951c9edea55e41ef5a1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page