The stack watch

December 3, 2026 · 4 min read

Automation & WorkflowsWatch log

Spark Declarative Pipelines Rewind Hits Beta: Roll Back Entire Dataflows

Spark Declarative Pipelines' new beta rewind feature rolls back entire dataflow graphs — tables, flows and streaming state — to consistent snapshots, replaying from that point without ad hoc backfills.

By James Calloway4 min read725 words

Spark Declarative Pipelines Rewind Hits Beta: Roll Back Entire Dataflows
Pexels / pixabay

Spark Declarative Pipelines has shipped a beta feature called rewind, and its central claim is a big one: it rolls back an entire streaming dataflow — every table, every flow and the pipeline's operational state — to a consistent point in the past. Not just one table. The whole graph.

That distinction matters. Delta Lake has offered time travel and RESTORE for a while, but RESTORE only reverts a table's contents. The processes that wrote the data still believe they processed it, so teams typically face ad hoc backfills — the very imperative cleanup work declarative pipelines exist to avoid. Depending on pipeline size, Databricks notes, that can run from annoying to outright infeasible.

What does rewind actually change?

The engineering team, in a post by Jose Torres, describes the mechanics plainly. As the pipeline executes, the system periodically generates rewind points — consistent metadata snapshots containing information for each flow and dataset in the pipeline. When something breaks, you pick a snapshot and execute the rewind. The pipeline's state travels back in time. You apply your fix — corrected source data or patched transformation logic — and processing resumes as though nothing went wrong. No backfills. No coordination gymnastics.

The promise sounds clean. The caveat? It's a beta, and the team itself lists what it doesn't yet do (more on that below).

How does it work under the hood?

Rewind leans on two existing log structures that turned out to be strikingly similar. Delta Lake tables store their history in a transaction log — a sequence of versioned entries, each pointing to blob storage paths holding the actual data. Spark Structured Streaming keeps its own metadata log of offsets and stateful operation data, originally built for failure recovery and idempotent microbatch retries. Recent work added a read_state_metadata lookup to streaming, analogous to DESCRIBE HISTORY in Delta Lake.

The team extended the Structured Streaming checkpoint layer with two new pieces of functionality to support rewind workloads. Identifying which version to rewind to is easy for triggered pipelines — snapshots between updates suffice. Continuous pipelines are harder, because dependent flows can run in parallel and out of step. The fix is two-step:

  • Rewind points maintain a set of graph invariants guaranteeing that naive reprocessing produces a superset of the rewound data.
  • Extra streaming logic on replay — a new batch type called a control batch — skips the data each flow already consumed, so nothing gets duplicated.

What about Auto Loader?

Auto Loader is the awkward case. In its standard setup it consumes transient file notifications from the cloud provider, and once those notifications are consumed, they're gone. You cannot restore them. Rewinding the stream can't reconstruct the original source state.

The team's answer is incrementalism: a new rewind log component holding metadata for archived checkpoint files, enabling fast lookup of the replay-relevant checkpoints. The same log supports on-demand loading of Auto Loader's checkpoint during normal execution, addressing disk-usage concerns that would otherwise come with increased retention. The result, they say, is rewind support without hurting steady-state performance.

What's still missing?

Plenty, and the post is candid about it. Three efforts are ongoing:

  • Definition rewind. The plan is to rewind the pipeline's definition, not just its execution state, enabling one-step resolution of code changes that produced bad data. But "the definition" bundles several components, and the team is still investigating how best to represent each within a rewind.
  • Downstream awareness. Pipeline results feed other automated processes, which today cannot distinguish a rewind from any other update. A protocol letting platform-wide consumers detect and react to rewinds is on the roadmap.
  • Correcting bad data. Rewind alone doesn't fix bad source rows. The recommended workflow: pick a rewind point from before the problem started, explore historical dataset state via the rewind interface's data preview or Delta Lake time travel, patch the transformation to filter out bad rows, and let the replay ingest the rest while the bad data awaits backfill.

It works with both triggered and continuous pipelines, per the team's FAQ, and the feature is available now in beta through the feature introduction and beta documentation. If your pipeline manages thousands of tables, the pitch is obvious. Whether the replay mechanics hold up at that scale is exactly what the beta period exists to find out.

Plot points

  1. Spark Declarative Pipelines rewind is available now in beta.
  2. Rewind resets every table, flow and operational state in a pipeline, unlike Delta Lake RESTORE which affects a single table.
  3. A new control batch type skips already-consumed data on replay, preventing duplication in continuous pipelines.
  4. Auto Loader rewind uses a new rewind log of archived checkpoint metadata because consumed file notifications cannot be restored.
  5. Definition rewind and a downstream consumer awareness protocol remain on the roadmap.

via databricks.com (Source)

Filed under

Share this article:

More from James Calloway

James Calloway

Show full bio

Correspondent covering people, launches and day-to-day practice in marketing technology at Martech Beacon.

47 articles

Neighbouring fixes

‹ Previous article