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.0.tar.gz (6.3 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.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for airflow_provider_ibm_db2-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ccc69395720cb95f86a72dae3b378f90babbdc8a52c7a8f823d1904aad3c2754
MD5 170dc40326cd47edca51fa4e0b248ce8
BLAKE2b-256 ddec471e6c333ca7cbc29d5930fb5b27afc8067bb5aa2eaaa594123e37ccb254

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for airflow_provider_ibm_db2-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35c90f3c1418d42fb0708c894cddc45e94af21ee90921b5fdccb8e99ad7be854
MD5 92b19e8a59bd72cd407ffbac898ede85
BLAKE2b-256 6e38422eb718cfa2860c314b06942566aff323d20c992ea3e4538e94171e9f8f

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