Session

Deep Dive Into Streaming and Batch ETLs With Lakeflow Spark Declarative Pipelines

Overview

ExperienceIn Person
TrackData Engineering & Streaming
IndustryEnterprise Technology, Consulting & Services
TechnologiesLakeflow, Unity Catalog
Skill LevelAdvanced

Let's deep dive into the new declarative ETL pipeline framework in Apache Spark™, Lakeflow Spark Declarative Pipelines (SDP). Let's peel it off to learn how SDP's high-level Python and SQL abstractions translate into lower-level Spark SQL and Spark Structured Streaming queries. During the talk, you will learn how SDP automatically resolves complex dependencies and builds optimized Directed Acyclic Graphs (DAGs) for both batch and streaming workloads. We will walk through the internal state management and orchestration logic that allows SDP to handle retries and incremental processing out of the box, replacing thousands of lines of imperative "glue code." You will leave with a clear mental model of the engine's architecture, the pros and cons of SDP, and be ready to debug and optimize your pipelines. You'll understand where and how to use it (alongside your existing ETL pipelines).

Session Speakers

Jacek Laskowski

/Freelance Data Engineer
books.japila.pl

Full Summary

Inside Spark Declarative Pipelines: a deeper look at the new ETL model

Spark Declarative Pipelines, introduced in Apache Spark 4.1 with more landing in the 4.2 release candidate, shifts ETL development from imperative jobs to declarative definitions. Engineers describe tables, views, sinks, and flows in Python and SQL, and the system plans and runs the pipeline without hand-built orchestration, compute management, or error handling. For teams already operating on the Databricks Platform, the ideas align with managed experiences, although the talk focuses on open source Spark. Teams exploring how declarative pipelines fit into a broader data strategy may find the Lakeflow Jobs a useful reference for how Databricks approaches managed pipeline execution.

FAQ


No. SDP is part of open source Apache Spark starting in 4.1, including the CLI, decorators, and the Spark Connect handler. The speaker believes pointing the CLI at a remote Databricks Spark Connect endpoint should work, but this has not been verified in the talk.

You could, but it is not the intended path. SDP's authoring model is Python and SQL only, with Scala and Java framed as low-level implementation languages rather than the developer surface for declarative pipelines.

Checkpoint locations are handled automatically. The storage property in the pipeline YAML stores checkpoint data for every streaming query, so offsets and metadata persist and runs can resume cleanly.

Both send the same messages to Spark Connect. A single boolean on the start run message tells the pipelines handler whether to perform a dry run or execute the plan.

Not yet. Spark 4.2 adds an SCD1 merge streaming writer and CDC append flows. SCD2 was planned but did not make the 4.2 release and remains under development.