An automated, modular ETL pipeline that ingests raw data from CSV files and REST APIs, transforms and validates it with Pandas, loads it into a PostgreSQL warehouse, and generates scheduled HTML KPI reports via Apache Airflow DAGs.
A fully automated, four-stage data pipeline designed to eliminate manual reporting bottlenecks. The system ingests raw data from CSV files and REST APIs, applies Pandas transformations with Great Expectations quality validation, persists clean records into a PostgreSQL warehouse via SQLAlchemy ORM, and generates polished HTML KPI dashboards through Jinja2 templates.
Apache Airflow DAGs orchestrate daily runs on a configurable schedule — no manual intervention required. The result: weekly reporting time dropped from 6 hours to under 20 minutes, and data quality issues that previously slipped through undetected are now caught automatically before reaching the warehouse.
Loads data from CSV files and REST API endpoints into raw DataFrames.
Pandas cleaning + Great Expectations schema and quality checks. Rejects invalid rows automatically.
SQLAlchemy ORM loads clean records into PostgreSQL. Declarative models manage schema migrations.
Jinja2 templates render KPI dashboards as standalone HTML files, ready for stakeholder distribution.
Apache Airflow DAG triggers the full pipeline daily. Manual trigger also available via Airflow CLI.
pip install -r requirements.txt
export DATABASE_URL="postgresql://user:password@localhost:5432/analytics"
python -c "from pipeline.warehouse.models import init_db; init_db()"
python -m pipeline.run \
--input data/sample/sales_sample.csv \
--output_dir outputs/reports/
# Copy DAG to Airflow home
cp dags/daily_pipeline.py $AIRFLOW_HOME/dags/
# Trigger manually
airflow dags trigger daily_data_pipeline
Open outputs/reports/kpi_report_YYYY-MM-DD.html in a browser to view the generated KPI dashboard.
requests