Chat about this article with your favourite AI tool
Databricks has launched a beta feature called rewind for Spark Declarative Pipelines (SDP). It lets data teams roll an entire pipeline back to an earlier point, covering both table contents and the streaming processes that produce them. The company said this reduces the need for backfills, and in some cases removes it entirely.
Databricks said the feature targets a common data engineering problem. Bad data can come from a faulty source system, a buggy change to a transformation, or upstream changes arriving before downstream processing is ready. The cleanup is usually done by hand, after the fact.

Why table-level fixes fall short
Delta Lake already supports time travel, which lets engineers inspect a table’s past state, and a RESTORE command that reverts a table’s contents. According to Databricks, both work on a single table. A pipeline may manage hundreds or thousands of tables, and bad data can spread across them and into operational state such as watermarks and intermediate aggregates.
RESTORE also leaves the writing processes unaware that anything changed. They still treat the data as processed, so recovery typically means complex backfills. Databricks said working out which data to backfill requires reasoning about source offsets and how they moved through the pipeline.
How rewind works
As a pipeline runs, SDP periodically creates “rewind points”. These are consistent metadata snapshots holding information for every flow and dataset. When something goes wrong, the user picks a point from before the problem began and runs the rewind. The pipeline is then ready to run again. After the data or transformation logic is fixed, it replays the rewound data as if for the first time.

Databricks said rewind works with both triggered and continuous pipelines. In continuous pipelines, dependent flows can run in parallel and out of step. The company said it handles this by choosing rewind points that guarantee replay covers all the rolled-back data. A new “control batch” type in Structured Streaming then skips data each flow had already consumed, to avoid duplicates.
Changes to Structured Streaming and Auto Loader
To support this, Databricks extended the Structured Streaming checkpoint layer. Streams can now run forward from any earlier batch still in retention. This needed extra source and sink metadata in the offset and commit logs, plus the control batch, which marks operations such as a rewind, repartition or protocol upgrade.
On Databricks Lakeflow, the company added “pinning”. A pinned streaming version is kept for up to seven days, even if the normal 100-batch retention interval is exceeded. Pinning preserves everything needed to rewind to that batch, including metadata logs, source state and state store data.
Auto Loader needed separate handling because it reads transient file notifications from cloud providers, and these cannot be restored once consumed. Databricks added a rewind log holding metadata on archived checkpoint files, so the system can quickly find what it must replay. The log also allows on-demand loading of Auto Loader checkpoints during normal runs, which the company said avoids higher disk usage from longer retention.
What comes next
Databricks said it plans to support rewinding the pipeline’s definition as well as its execution state. That would cover pipeline code, the results of metaprogramming, parameters, SQL configurations and out-of-band table controls. This would allow one-step fixes for code changes that produced invalid data.
The company also wants a protocol to tell downstream consumers across the platform that a rewind has happened, since they cannot easily tell a rewind from other updates today.
Users who want to test rewind can sign up for the beta. Databricks has published a feature introduction and beta documentation.
Source: Databricks Blog

