Lakeflow pipelines and data quality · Lesson 1 of 3
Declarative pipelines and dependencies
Describe data transformations and let the pipeline framework manage dependencies.
Lesson
Lakeflow pipelines use the Apache Spark Declarative Pipelines framework to define data transformations in SQL or Python. A declarative pipeline describes datasets and dependencies; the system plans execution and manages pipeline operations. This differs from manually sequencing every table write in notebook code, though you still need to design correct definitions, expectations, and source handling.
Use clear dataset names and keep each transformation focused. Understand the distinction between a streaming table for incremental processing and a materialized view for maintained query results based on its definition and supported semantics. Features and syntax can evolve, so check current documentation and runtime support. Practice task: sketch dependencies from a raw event source through validated events to a daily summary.
Applying the pattern: Define source and target datasets, express transformations as dependencies, validate the pipeline graph, then monitor updates and failures.
Checks and failure modes: A declarative framework does not make an incorrect join, data contract, or quality rule correct automatically.
Before production, test both a representative input and a boundary case. Confirm the expected row grain, permissions, recovery behavior, and observable output for the task. Record the configuration needed to reproduce the run and compare its result with the agreed data contract.
Practice task: What does a declarative pipeline primarily describe?
Visual guide
A declarative dependency graph
-
Step 01
Source
Read approved batch or streaming input.
-
Step 02
Transform
Define typed and tested datasets.
-
Step 03
Target
Publish streaming tables or views.
-
Step 04
Monitor
Inspect update status and quality.
Key points
- Define source and target datasets, express transformations as dependencies, validate the pipeline graph, then monitor updates and failures.
- A declarative framework does not make an incorrect join, data contract, or quality rule correct automatically.
- Re-run the included practice scenario after changing source data or transformation logic.
Check your understanding
Practice
Your learning progress