← Erwin Glenn Capitan II View repo

Project summary · Azure Data Factory · Databricks · Delta Live Tables · Unity Catalog · PySpark

Azure SQL to Lakehouse, with SCD2 History

Metadata-driven ingestion in Data Factory, Auto Loader into Delta, and Declarative Pipelines building Type 2 dimensions — proven with a live change test, not just a green run.

Role
Personal build
Stack
Azure Data Factory · Databricks · Delta Live Tables · Unity Catalog · PySpark
Status
Complete · environment retired
Repository
glcapitan / azureproject

Why I built it

Anyone can show a pipeline that ran green once. The harder question is what happens on the second run, and on the run after a source row changes. This project exists to answer that with evidence.

Questions it answers

How I built it

  1. One pipeline, every table. A ForEach loop reads a config array of tables and their CDC columns, so adding a table is a config change rather than a new pipeline.
  2. Watermark incremental loading. Each run looks up the last loaded timestamp, pulls only rows newer than it, then writes the new high-water mark back to the lake.
  3. Bronze to silver with Auto Loader. Databricks streams the landed Parquet into Delta tables with checkpoints, so reruns are idempotent by construction.
  4. Shared transformation library. Common cleanups live in one reusable class the silver notebook imports, instead of being copy-pasted per table.
  5. Gold with Declarative Pipelines. Auto CDC flows build Type 2 dimensions keyed on the business key and sequenced by the update timestamp, plus a Type 1 upsert for the fact table.
  6. Governance and alerting. Unity Catalog external locations and a managed catalog control access; a Logic App emails on pipeline failure.
End-to-end architecture: Azure SQL through to gold
End-to-end architecture: Azure SQL through to gold
Metadata-driven ingestion loop in Data Factory
Metadata-driven ingestion loop in Data Factory
SCD Type 2 result — validity windows in the gold dimension
SCD Type 2 result — validity windows in the gold dimension
Integrity check: exactly one open row per user
Integrity check: exactly one open row per user
Unity Catalog governance over the lakehouse
Unity Catalog governance over the lakehouse

How I know it works

Honest notes

Built following Ansh Lamba's Azure end-to-end tutorial, disclosed in the repo README. The SCD2 validation queries, the reusable transformations class and the no-op handling are extensions I added. The Azure free trial has since ended, so the live environment no longer runs — the code, screenshots and validation output remain in the repo.