Metadata-Version: 2.4
Name: airflow-provider-ibm-db2
Version: 0.1.2
Summary: Apache Airflow provider for IBM Db2 (Hook + Operators, ibm_db_dbi with pyodbc fallback)
Project-URL: Homepage, https://github.com/armandospxp/airflow-provider-ibm-db2
Project-URL: Repository, https://github.com/armandospxp/airflow-provider-ibm-db2
Project-URL: Issues, https://github.com/armandospxp/airflow-provider-ibm-db2/issues
Author: Armando Rodriguez
License: MIT License
        
        Copyright (c) 2025
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        ... (truncated for brevity in this context) ...
License-File: LICENSE
Classifier: Framework :: Apache Airflow
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Requires-Dist: apache-airflow<2.6,>=2.4
Provides-Extra: dev
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: types-pyyaml; extra == 'dev'
Description-Content-Type: text/markdown

# airflow-provider-ibm-db2

[![PyPI version](https://badge.fury.io/py/airflow-provider-ibm-db2.svg)](https://pypi.org/project/airflow-provider-ibm-db2/)
[![Python Versions](https://img.shields.io/pypi/pyversions/airflow-provider-ibm-db2.svg)](https://pypi.org/project/airflow-provider-ibm-db2/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![CI](https://github.com/YOUR_GITHUB_USERNAME/airflow-provider-ibm-db2/actions/workflows/ci.yml/badge.svg)](https://github.com/YOUR_GITHUB_USERNAME/airflow-provider-ibm-db2/actions)

**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_dbi` → `pyodbc` (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)
```bash
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)**:
```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
