All projects

Retail Data Warehouse ETL Pipeline

Click an image to zoom.

Overview

This project demonstrates a complete End-to-End ETL Pipeline built in SQL Server Integration Services (SSIS), taking raw retail sales CSV files through staging, validation, and transformation into a fully modeled star schema data warehouse. The pipeline processes each source file as an isolated, auditable run, with a dedicated audit log tracking row counts and status per execution, and a row-level error log capturing granular, rule-specific rejection reasons instead of generic failures. The customer dimension implements a true Type 2 Slowly Changing Dimension, correctly handling multiple attribute changes within a single load. During development, a subtle data-integrity bug was diagnosed — one that mimicked a classic race condition but actually stemmed from SSIS's buffer-based row processing rather than transaction concurrency — and was resolved by re-architecting the dimension-loading sequence. The finished pipeline is idempotent (safe to rerun without duplicating data), deployed to SSISDB, and scheduled via SQL Server Agent.

Key Features

  • End-to-End SSIS Pipeline: Orchestrated a full CSV-to-data-warehouse pipeline across staging, validation, dimension loading, and fact loading.
  • Per-Run Audit Logging: Every file processed generates a unique run ID with tracked start/end time, row counts, and status in a dedicated audit table.
  • Granular Error Routing: Invalid rows are routed to an error log with specific, rule-level rejection reasons rather than generic failure messages.
  • Type 2 Slowly Changing Dimension: Implemented full SCD2 history tracking for the customer dimension, including correct chronological handling of multiple changes within the same load.
  • Business Rule Validation: Custom validation logic distinguishing sales from cancellations/returns, applying different rules to each while keeping both in a single fact table.
  • Diagnosed a Buffer-Level Concurrency Bug: Identified and resolved a data-integrity issue caused by SSIS's row-buffering behavior, redesigning the dimension-load sequencing to eliminate duplicate inserts.
  • Idempotent Design: Built skip-if-already-processed logic so the entire pipeline can be safely rerun without creating duplicate data.
  • Fault-Isolated Batch Processing: A single failed file does not halt the batch — errors are logged and the pipeline continues processing remaining files.
  • Star Schema Data Warehouse: Modeled Date, Customer, and Product dimensions alongside a Sales fact table for analytical reporting.
  • Production Deployment: Deployed to the SSIS Catalog (SSISDB) and scheduled for automated execution via SQL Server Agent.