Module 4: Delta Live Tables

Your medallion pipeline breaks at 3am and nobody knows which step failed or what data was affected. What if you declared the outcome instead of coding every step?

in-progress

In Module 3, you built a medallion pipeline by hand — Python scripts that read Bronze, clean to Silver, and aggregate to Gold. It works. But in production at the wind utility, that pipeline runs every 10 minutes, 24/7. When it fails at 3am because a weather station sent malformed JSON, nobody knows which step failed, what data was affected, or whether the Silver table is now inconsistent.

You also can’t answer a simple question: “What percentage of our SCADA readings passed quality checks this month?” The compliance team needs that number. Your hand-coded pipeline doesn’t track it.

Delta Live Tables (DLT) — now called Lakeflow Spark Declarative Pipelines — shifts from imperative to declarative. Instead of writing the orchestration (read this, transform that, write here, handle errors), you describe the datasets you want and the quality rules they must satisfy. The engine figures out execution order, handles retries, and tracks data quality metrics automatically.

The name change is recent (2025), and the DLT → Lakeflow Declarative Pipelines transition is still in progress. The underlying concepts are the same, but the API surface is evolving — import dlt is becoming from pyspark import pipelines. This module teaches the concepts that are stable and flags what’s in transition.

For enterprise buyers, the data quality tracking (@dlt.expect) is often more valuable than the pipeline automation itself. Being able to tell a NERC auditor “our Silver turbine data has a 99.7% validity rate this month, and here’s the trend” is what compliance teams actually want.

Prerequisites #

Complete Module 3: Medallion Architecture. You need to have built the medallion pipeline manually to appreciate what DLT automates.

Exercises #

Exercises live in modules/04-delta-live-tables/exercises/. You’ll convert the hand-coded medallion pipeline into a declarative DLT pipeline with quality expectations.

Lectures

  1. When pipelines break at 3am — Your hand-coded medallion pipeline fails overnight because a weather station sent malformed JSON. Nobody knows which step failed, what data was affected, or whether Silver is now inconsistent. This is the problem declarative pipelines exist to solve.
  2. Declarative vs. imperative pipelines — You describe WHAT the data should look like. The engine figures out HOW to get there. This shift -- from writing orchestration to declaring outcomes -- is the core idea behind Delta Live Tables and Lakeflow Declarative Pipelines.
  3. Data quality expectations: the enterprise killer feature — The three expect variants -- warn, drop, fail -- give you auditable data quality metrics that NERC compliance teams actually care about. This is often the feature that closes the deal.
  4. When to use DLT vs. alternatives — DLT is a pipeline engine, Airflow is an orchestrator, dbt is a SQL transformation framework. They are not interchangeable -- and in production, you often use more than one. Here is how to choose.

Exercises

  • Exercises: Delta Live Tables — Convert your Module 3 medallion pipeline into a declarative DLT pipeline with quality expectations, then watch the quality dashboard track a deliberately bad reading

Knowledge Tests