You can use the time travel feature to query or roll back historical data of a
table.
When you create or delete Apache Iceberg or Delta Lake table items, it automatically generates
a snapshot and replaces the old data with the snapshot data. You can utilize these snapshots
to perform time travel queries and roll back data as it existed at a specific point in time or
at a specific snapshot.
When you configure a source transformation in a mapping, you can use the advanced filter option
in your Open Table object to configure a time travel query. The query fetches the data based
on a timestamp or snapshot ID you specify.
You can use one of the following queries to retrieve the data:
Query by Timestamp
: You can query an
Iceberg or Delta Lake table as it existed at a particular timestamp.
For example, if you
want to time travel to July 10, 1986 at 04:20:09, use the following time travel
query:
TimestampValue = 1986-07-10 04:20:09.0 UTC
Query by Snapshot ID
: You can query an
Iceberg or Delta Lake table by specifying a snapshot ID. Each snapshot has a unique
identifier.
For example, if you want to time travel to a snapshot with ID
33444444553321, use the following time travel query: