-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Data Engineering with Apache Spark, Delta Lake, and Lakehouse
By :

A unique feature of Delta Lake is its ability to perform time travel. By using this feature, you can query and restore previous snapshots of your table. Access to previous snapshots is granted by using the versionAsOf
option.
Important Note
The time travel functionality in Delta Lake implements data lineage. Data lineage is an extremely critical tool for data audits and compliance purposes. The same feature comes in handy for data engineers who are trying to trace data anomalies.
version
0
of the table – in other words, when it was created:%sql SELECT * FROM store_orders VERSION AS OF 0 WHERE order_number=5;
This results in the following output:
Figure 6.25 – Checking the data in the sales_orders table for the sample row for version 0
Notice how the previous version of the table shows the sale_ price
value as 98.41
.