A SQL-based data warehouse built to practice modern data engineering and analytics workflows — taking raw source data through cleansing and modeling into a business-ready analytical layer.
This project follows the Medallion Architecture, organizing data into three layers:
| Layer | Purpose |
|---|---|
| Bronze | Raw data ingested as-is from source systems (CSV files → database tables) |
| Silver | Cleansed, standardized, and normalized data, ready for transformation |
| Gold | Business-ready data modeled into a star schema for reporting and analytics |
Data-Warehouse-SQL/ │ ├── datasets/ # Raw source data (e.g. ERP/CRM CSV files) ├── docs/ # Documentation — data catalog, architecture diagrams, naming conventions ├── scripts/ # SQL scripts for ETL and transformations (bronze → silver → gold) ├── tests/ # Data quality checks and validation scripts ├── LICENSE # MIT License └── README.md # Project overview (this file)
- Data Engineering: Consolidate data from multiple source systems into a single, clean, analytics-ready warehouse.
- Data Modeling: Design fact and dimension tables using a star schema optimized for querying.
- Analytics: Write SQL queries to surface insights on things like customer behavior, product performance, and sales trends.
- SQL Server (T-SQL)
- Git / GitHub for version control
- Clone the repo
git clone https://github.com/abhinavtbuilds/Data-Warehouse-SQL.git-
Edit the
BULK INSERTpaths inscripts/bronze/proc_load_bronze.sql(they start with/sql/datasets/) so they point to thedatasets/folder on your SQL Server host. -
Run the scripts in this exact order:
Step Script 1 scripts/init_database.sql2 scripts/bronze/ddl_bronze.sql3 scripts/bronze/proc_load_bronze.sql4 scripts/silver/ddl_silver.sql5 scripts/silver/proc_load_silver.sql6 scripts/gold/ddl_gold.sql -
Check
docs/for the data catalog and schema details.
Row counts of the raw CSV files in datasets/ (excluding the header row):
| File | Source system | Rows |
|---|---|---|
source_crm/cust_info.csv |
CRM | 18,494 |
source_crm/prd_info.csv |
CRM | 397 |
source_crm/sales_details.csv |
CRM | 60,398 |
source_erp/CUST_AZ12.csv |
ERP | 18,484 |
source_erp/LOC_A101.csv |
ERP | 18,484 |
source_erp/PX_CAT_G1V2.csv |
ERP | 37 |
This project is licensed under the MIT License — see LICENSE for details.