This project demonstrates an end-to-end data ingestion and transformation pipeline for a fictional bike store business. The goal is to extract, clean, and transform raw operational data into a dimensional model suitable for analytics.
use case/
├── 1_source/ # Raw source data
├── 2_landing/ # Cleaned & structured data per date
├── 3_profiling/ # Data profiling outputs (HTML reports)
├── 4_cleaned/ # Cleaned tables ready for modeling
├── 5_datamart/ # Final dimensional model (star schema)
├── meta_data.csv # Metadata rules (types, PKs, nullability, etc.)
├── utils.py # Helper functions
└── *.ipynb # Notebooks for each pipeline stage
The dimensional model is based on a star schema with:
- 4 dimension tables:
Customer_DIM,Product_DIM,Store_DIM,Staff_DIM - 1 calendar table:
Date_DIM - 2 fact tables:
Sales_Fact,Stock_Fact
-
Ingest
- Raw CSVs are copied from the source directory.
-
Clean
- Apply validation based on
meta_data.csv:- Remove nulls in non-nullable columns
- Enforce data types
- Drop duplicates based on primary and unique keys
- Apply validation based on
-
Profile
- Generate visual profiling reports using
ydata-profiling
- Generate visual profiling reports using
-
Build Dimensional Model
- Construct star schema using cleaned data
- Create surrogate keys and map date fields to
Date_DIM
-
Export
- Final tables saved to
5_datamart/as flat files (CSV)
- Final tables saved to
Customer_DIM.csvProduct_DIM.csvSales_Fact.csvDate_DIM.csvStock_Fact.csv
- All data is processed locally using Python (Pandas)
- Designed for reproducibility and clarity in ETL design
