Skip to content

NishantSingh359/MySQL-DataWarehouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

48 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Data Warehouse (MySQL)

This project implements a layered Data Warehouse architecture using MySQL.
It follows industry-standard Bronze β†’ Silver β†’ Gold layers and supports multiple execution methods using .bat scripts.


🧱 Architecture Overview

Source CSV Files
↓
Bronze Layer (Raw Ingestion)
↓
Silver Layer (Clean & Standardized)
↓
Gold Layer (Business-Ready Tables)


πŸ“ Project Structure

DATAWAREHOUSE-MYSQL/
β”‚
β”œβ”€β”€ data/
β”‚ β”œβ”€β”€ crm/
β”‚ β”‚ β”œβ”€β”€ cust_info.csv
β”‚ β”‚ β”œβ”€β”€ prd_info.csv
β”‚ β”‚ └── sales_details.csv
β”‚ β”‚
β”‚ └── erp/
β”‚ β”œβ”€β”€ cust_loc.csv
β”‚ β”œβ”€β”€ cust_per_info.csv
β”‚ └── prd_cate.csv
β”‚
β”œβ”€β”€ scripts/
β”‚ β”œβ”€β”€ run_bronze.bat
β”‚ β”œβ”€β”€ run_silver.bat
β”‚ β”œβ”€β”€ run_gold.bat
β”‚ β”œβ”€β”€ run_dw.bat
β”‚ └── run_test_gold.bat
β”‚
β”œβ”€β”€ sql/
β”‚ β”œβ”€β”€ bronze.sql
β”‚ β”œβ”€β”€ silver.sql
β”‚ └── gold.sql
|
β”œβ”€β”€ test/
β”‚ └── test_gold.sql
β”‚
β”œβ”€β”€ .gitignore
└── readme.md


πŸ”Ή Bronze Layer (Raw Data)

  • Loads CSV files directly into MySQL
  • No transformation applied
  • Used for audit and reprocessing
  • Uses LOAD DATA INFILE

πŸ“„ Script:

  • sql/bronze.sql
  • Executed via scripts/run_bronze.bat

πŸ”Ή Silver Layer (Cleaned Data)

  • Data cleansing (null handling, data types, duplicates)
  • Standardized column names
  • Business keys prepared

πŸ“„ Script:

  • sql/silver.sql
  • Executed via scripts/run_silver.bat

πŸ”Ή Gold Layer (Business Layer)

  • Aggregations
  • KPIs & reporting tables
  • Optimized for analytics & dashboards

πŸ“„ Script:

  • sql/gold.sql
  • Executed via scripts/run_gold.bat

▢️ How to Run the Data Warehouse

Run Full Pipeline

scripts/run_dw.bat

🎯 Key Features

  • Layered DW architecture
  • Batch execution using .bat files
  • Separate CRM and ERP sources
  • Re-runnable & modular design

πŸ‘€ Author

Nishant Singh

Data Analytics Student

Releases

No releases published

Packages

No packages published