TECHNOLOGY

Delta Lake time travel: retaining the data behind a table version

In this article
THE QUICK TAKE

Reading an old Delta table version requires its log information and data files; a visible history entry is not a permanent copy of those files.

Freeze a table version for the experiment

Delta Lake supports reading an older table snapshot by version or timestamp. This is useful when a training dataset comes from a table that continues to receive updates. An unqualified read of the latest state can change between experiments without any modification to the training script.

Record the table identity and the selected version alongside the transformation and model configuration. If several tables contribute features or labels, identify each selected state. A fixed version for one table does not automatically make a multi-table preparation process consistent.

A timestamp and a version are different selectors

The documentation notes that timestamp-based selection depends on the corresponding log file timestamps. Copying a table directory can affect that behavior, while version-based selection is unaffected by that particular timestamp change. This matters when moving an experimental copy between environments.

Use a version identifier when the goal is to replay a known table state, and preserve the relevant table identity. A familiar wall-clock time may be useful context, but it should not be the only description of which artifact the experiment consumed.

Historical reads need both metadata and data

Time travel requires the log information and the data files for the requested version. Delta exposes distinct retention settings for logs and logically deleted data files. Configuring one does not automatically preserve the other for an arbitrary period.

For a long-lived experiment, test an actual historical read under the intended retention policy. A history query alone does not demonstrate that every required data file still exists. Keep failures to reconstruct the snapshot separate from model-loading or training failures.

VACUUM changes physical availability

VACUUM removes eligible data files no longer needed within the retention boundary. The utility documentation distinguishes that operation from automatic log cleanup. Once required historical files are physically removed, an older table version can cease to be readable through time travel.

Do not shorten retention merely because the current table still queries successfully. Long-running readers and later experiment reconstruction can need older files. Review the longest intended access period and the documented utility behavior before choosing a cleanup policy.

Preserve a dataset release deliberately

A proposed release record includes table version, data-preparation revision, selected columns, filter rules and a reconstruction check. If the historical-read horizon is shorter than the required research horizon, preserve a separately governed release artifact rather than assuming time travel supplies indefinite archival storage.

Delta’s versioning makes changes and historical reads inspectable. It does not decide whether a label was available at prediction time or whether a selected column leaks the target. Those are separate dataset-design questions that remain important after the snapshot itself is fixed.

Primary references

Delta historical table reads.

Delta table utilities.

Delta table properties.

Related explanations: Artifact provenance; Data preparation memory.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles