Retail DB - ETL Pipeline (MySQL + SQL Server)

ETLNov 2023By Tinotenda Linton

Production-style ETL moving retail transactions from MySQL to SQL Server with cleaning, type normalization, and upsert logic for analytics.

SQLPythonUpsertETLData PipelineData IntegrationData TransformationUpsert Statements

Retail DB - ETL Pipeline (MySQL SQL Server)

This project extracts retail transactions from a MySQL source, transforms them for consistency and analysis, and loads them into Microsoft SQL Server.

Extract

  • Incremental pulls by updated_at
  • Source schema sanity checks and row counts

Transform

  • Data cleaning and type conversions (dates, numerics)
  • Conforming dimensions (product, customer, store)
  • Derived metrics (gross, net, discounts, tax)
  • Surrogate keys and slowly changing attributes where needed

Load

  • Staging tables for idempotent loads
  • MERGE/upsert strategy to avoid duplicates
  • Indexes for reporting queries

Deliverables

  • Star-schema views for BI
  • Reconciliation queries and run logs

Outcome

Reliable daily loads with accurate aggregates ready for dashboards and adhoc analysis.