When building data pipelines on Databricks, one of the most common design questions is whether to use Lakeflow Spark Declarative Pipelines (formerly Lakeflow Spark Declarative Pipelines / Lakeflow Spark Declarative Pipelines), Workflows (Jobs), or a combination of both. Lakeflow Spark Declarative Pipelines is declarative: you describe what you want, and the framework manages data quality and dependencies for you. Workflows is imperative: you describe how things should run, composing arbitrary tasks into a DAG for flexible orchestration.
This article compares the two across four dimensions — execution model, error handling, data quality, and cost — then walks through the combined pattern and a decision flow for picking between them.
| Dimension | Lakeflow Spark Declarative Pipelines (Declarative Pipelines) | Workflows (Jobs) |
|---|---|---|
| Execution model | Declarative: the framework resolves table dependencies automatically | Imperative: task execution order is defined explicitly in a DAG |
| Definition | @dlt.table decorator or SQL CREATE LIVE TABLE | JSON/YAML, UI, Databricks CLI, or REST API |
| Error handling | Expectations built in (record, drop, or fail on quality violations) | Per-task retries, conditional branches, and notifications |
| Data quality | Declarative quality gates via Expectations | No built-in quality features — you implement them yourself in notebooks |
| Reprocessing | Framework manages Full Refresh and incremental processing | You implement backfill logic manually |
| Lineage | Table dependencies are visualized automatically | The task DAG is visualized, but data lineage requires separate tooling |
| Target workloads | ETL/ELT pipelines (table transformations) | Any task: ETL, ML, notifications, external API calls, and more |
| Cost | Lakeflow Spark Declarative Pipelines DBU rate applies (higher than standard Jobs) | Jobs Compute DBU rate (lower than Lakeflow Spark Declarative Pipelines) |
| Compute management | Lakeflow Spark Declarative Pipelines manages the cluster automatically (Enhanced Autoscaling) | Specify a job cluster or an existing cluster |
In Lakeflow Spark Declarative Pipelines you simply declare "this table comes from this source with these transformations," and the framework handles dependency resolution, incremental processing, and schema evolution.
import dlt
from pyspark.sql.functions import col, current_timestamp
@dlt.table(comment="Bronze layer: raw ingestion")
def bronze_orders():
return (
spark.readStream
.format("cloudFiles")
.option("cloudFiles.format", "json")
.load("/mnt/landing/orders/")
)
@dlt.table(comment="Silver layer: cleansed")
@dlt.expect_or_drop("valid_amount", "amount > 0")
def silver_orders():
return (
dlt.read_stream("bronze_orders")
.select("order_id", "customer_id", "amount", "region",
current_timestamp().alias("processed_at"))
.filter(col("order_id").isNotNull())
)
@dlt.table(comment="Gold layer: aggregated")
def gold_revenue_by_region():
return (
dlt.read("silver_orders")
.groupBy("region")
.agg({"amount": "sum"})
.withColumnRenamed("sum(amount)", "total_revenue")
)Use dlt.read_stream() for streaming reads and dlt.read() for batch reads. Dependencies between tables are resolved automatically from what each read/read_stream references, so you never have to specify execution order.
Workflows defines task dependencies as a DAG (directed acyclic graph). Each task can be a notebook, Python script, JAR, Lakeflow Spark Declarative Pipelines pipeline, dbt project, and more, and you can assign different compute resources to each one.
# Conceptual DAG structure for Workflows
#
# [extract_task] ──→ [dlt_pipeline_task] ──→ [notify_task]
# │ ↑
# └──→ [validate_source_task] ──────────────┘
#
# - extract_task: pull data from an external API (Python notebook)
# - dlt_pipeline_task: ETL in a DLT pipeline (task type: Pipeline)
# - validate_source_task: check connectivity to the source data
# - notify_task: Slack notification (success/failure routed by a condition)The strength of Workflows is the flexibility to set retries, timeouts, and conditional branches (if/else/for_each) per task. It can also unify non-transformation work like ML model training, external API calls, and notifications under one orchestrator.
The most common production pattern is to embed a Lakeflow Spark Declarative Pipelines pipeline as a single task inside a Workflows DAG. Let Lakeflow Spark Declarative Pipelines handle the ETL transformations and quality controls, and let Workflows orchestrate everything around them.
| Task order | Owner | What it does |
|---|---|---|
| 1. Data ingestion | Workflows task (notebook) | Pull JSON from an external API and save it to the landing zone |
| 2. ETL transformations | Workflows task (Lakeflow Spark Declarative Pipelines pipeline) | Process Bronze → Silver → Gold declaratively in Lakeflow Spark Declarative Pipelines |
| 3. Data validation | Workflows task (notebook) | Validate record counts and checksums on Gold tables |
| 4. Notifications | Workflows task (conditional branch) | On success, send Slack notifications; on failure, page via PagerDuty |
In this setup the Lakeflow Spark Declarative Pipelines pipeline's success or failure propagates as the Workflows task status, so you can combine it with downstream conditional branches and retry settings for sophisticated error handling.
Choose between Lakeflow Spark Declarative Pipelines and Workflows based on the nature of your pipeline and your team's needs.
Is the pipeline centred on table transformation (ETL/ELT)?
├─ YES -> do you need data quality management (Expectations)?
│ ├─ YES -> use DLT (consider pairing it with Workflows)
│ └─ NO -> Workflows alone if simple, consider DLT if complex
└─ NO -> a mix of tasks such as ML training, external APIs, notifications?
└─ YES -> use Workflows (add DLT if there is an ETL part)Lakeflow Spark Declarative Pipelines bills at a Lakeflow Spark Declarative Pipelines-specific DBU rate, which is higher than standard Jobs Compute DBUs. However, Lakeflow Spark Declarative Pipelines also delivers cluster optimization via Enhanced Autoscaling and automates incremental processing, so the right comparison is total cost — including the development and operational cost of building the same features by hand.
| Cost item | Lakeflow Spark Declarative Pipelines | Workflows (notebook run directly) |
|---|---|---|
| DBU rate | Lakeflow Spark Declarative Pipelines rate (higher than Jobs Compute) | Jobs Compute rate |
| Cluster management | Automatic (Enhanced Autoscaling) | Manual configuration (over/under-provisioning risk) |
| Quality-control dev cost | Built-in Expectations (no extra development) | Build it yourself (dev, test, and maintenance cost) |
| Incremental-processing dev cost | Managed automatically by the framework | Implement Structured Streaming or merge logic yourself |
Data Engineer Associate / Professional
Question 1
A data engineer is designing a pipeline with these requirements: (1) pull data from an external API, (2) run a 3-stage Bronze → Silver → Gold ETL, (3) automatically drop quality-violating records at the Silver layer, and (4) send a Slack notification when the pipeline finishes. Which architecture is the best fit?
Correct answer: C
External API ingestion and Slack notifications fall outside Lakeflow Spark Declarative Pipelines's scope (they aren't table transformations), so Lakeflow Spark Declarative Pipelines alone cannot satisfy the requirements. Building the DAG in Workflows and embedding the ETL portion as a Lakeflow Spark Declarative Pipelines pipeline task lets you combine Lakeflow Spark Declarative Pipelines's Expectations-based quality controls with Workflows' flexible task orchestration, including notifications.
Can a Lakeflow Spark Declarative Pipelines (formerly Delta Live Tables) pipeline run as a task inside a Workflow?
Yes. Workflows includes a task type called Lakeflow Spark Declarative Pipelines pipeline, which lets you embed a Lakeflow Spark Declarative Pipelines pipeline as a single node in your DAG. A common layout is data ingestion in the first task, Lakeflow Spark Declarative Pipelines transformations in the middle, and notifications at the end. This is the most common combined pattern, pairing Lakeflow Spark Declarative Pipelines's declarative quality controls with Workflows' orchestration.
How does error handling differ between Lakeflow Spark Declarative Pipelines and Workflows?
Lakeflow Spark Declarative Pipelines handles errors automatically inside the pipeline based on Expectations (quality constraints), choosing between record, drop, or fail. Workflows lets you configure retries, conditional branches (if/else tasks), and notifications per task, giving you broader orchestration control. When combined, Lakeflow Spark Declarative Pipelines handles data quality errors while Workflows handles infrastructure failures and task-level failures — a two-layer model.
Should small teams adopt Lakeflow Spark Declarative Pipelines?
If your ETL pipeline has dependencies across 3+ tables and you need quality controls or lineage visualization, Lakeflow Spark Declarative Pipelines pays off even at small scale. On the other hand, if you only need to run a single notebook on a schedule, Workflows alone is enough. Factor in the operational overhead of Lakeflow Spark Declarative Pipelines's management tables and event logs when you decide.
Practice with certification-focused question sets
Try free questionsNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Databricks Certifications: All 7 Exams, Difficulty & Study Plan (2026)
Complete guide to all 7 Databricks certifications — Data Eng...
Databricks Exam Difficulty Ranking: All 7 Certs Compared (2026)
Every Databricks certification ranked by difficulty, with st...
Databricks Study Guide: Fastest Pass Route & Time Estimates (2026)
How to pass Databricks certifications efficiently. Official ...
Databricks Data Engineer Associate: Complete Guide (2026)
Domain-by-domain breakdown of the Databricks Certified Data ...
Databricks Data Engineer Professional: Complete Guide (2026)
Tactics for the Databricks Certified Data Engineer Professio...