Time Travel allows you to query, restore, or compare data from a previous version of a Delta table.
Delta Lake automatically keeps track of every version of the table using the transaction log (_delta_log
).Purpose :-
-
Undo accidental deletes/updates
-
Debug or audit historical data
-
Test data pipelines on past versions
-
Compare changes over time
Ways to use it:-
-
versionAsOf
(version number) -
timestampAsOf
(specific timestamp)