This repository contains a full end-to-end Data Engineering implementation of a SQL-based Data Warehouse using Microsoft SQL Server.
The project follows a layered warehouse architecture (Bronze, Silver, Gold) and demonstrates how raw operational data from CRM and ERP systems is transformed into business-ready analytical models using pure SQL.
The solution is designed to reflect real enterprise data warehouse practices, including structured ETL layers, stored procedures, data lineage, dimensional modeling, and documentation.
The overall system architecture follows a traditional enterprise data warehouse pattern.
Key characteristics:
- SQL Server as the warehouse engine
- Layered architecture for traceability and data quality
- Stored procedures for ETL orchestration
- Separation of raw, cleaned, and analytical data
Purpose:
Ingest raw data from source systems without business transformations.
Characteristics:
- Tables mirror source system structures
- Batch processing using full load (truncate & insert)
- No transformations applied
- Acts as a recovery and audit layer
Object Type: Tables
Load Strategy: Batch | Full Load | Truncate & Insert
Source Tables:
crm_sales_detailscrm_cust_infocrm_prd_infoerp_cust_az12erp_loc_a101erp_px_cat_g1v2
Purpose:
Prepare high-quality, integrated data ready for analytical modeling.
Transformations Applied:
- Data cleansing (null handling, trimming, casting)
- Data standardization (naming, formats)
- Deduplication
- Normalization
- Derived columns
- Data enrichment across CRM and ERP
Object Type: Tables
Load Strategy: Batch | Full Load | Truncate & Insert
This layer resolves inconsistencies between CRM and ERP systems and creates a unified data model.
Purpose:
Expose analytics-ready datasets for reporting and analysis.
Characteristics:
- No physical data loads
- Implemented using SQL views
- Business logic and aggregations applied
- Optimized for BI and analytical queries
Data Models Supported:
- Star Schema
- Flat Tables
- Aggregated Tables
The following diagram illustrates end-to-end data lineage, showing how data moves from source systems → Bronze → Silver → Gold.
Flow Summary:
- CRM and ERP data land in Bronze tables
- Silver layer applies cleansing and standardization
- Gold layer integrates Silver tables into dimensions and facts
CRM and ERP systems provide overlapping but complementary data.
The integration logic ensures a single, consistent business view.
Integration Highlights:
- CRM provides transactional sales, customer, and product data
- ERP enriches customer attributes (birthdate, country)
- ERP provides product categories and pricing classifications
- Customer and Product entities are unified across systems
The Gold layer implements a Sales Data Mart using dimensional modeling.
gold.dim_customersgold.dim_products
gold.fact_sales
Fact Grain:
One row per sales transaction (order_number, product, customer)
Measures:
sales_amountquantityprice
Business Rule:
sales_amount = quantity * price- Surrogate key:
customer_key - Attributes:
- customer_id
- customer_number
- first_name
- last_name
- gender
- marital_status
- birthdate
- country
- Surrogate key:
product_key - Attributes:
- product_id
- product_number
- product_name
- category
- subcategory
- product_line
- maintenance
- cost
- start_date
- Foreign keys:
- product_key
- customer_key
- Dates:
- order_date
- shipping_date
- due_date
- Metrics:
- quantity
- price
- sales_amount
ETL logic is implemented using SQL scripts and stored procedures.
Approach:
- Layer-specific stored procedures
- Deterministic execution order
- Re-runnable batch processing
- Clear source-to-target mappings
- Clear data lineage across layers
- Business-friendly naming conventions
- Schema-level separation
- Column-level definitions supported via data catalog
- Microsoft SQL Server
- SQL (DDL, DML, Stored Procedures)
- Dimensional Modeling
- Git & GitHub
- Data Engineering portfolio project
- Interview discussion reference
- SQL warehouse design showcase
- Analytics and reporting backend template



