From the course: Manage and Optimize Big Data with Apache Iceberg

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Implementing time travel

Implementing time travel

- [Instructor] Let's quickly see how we can use the time travel. Click on +New, create a new notebook. Let's rename this notebook to TimeTravel. We already have a table. Let me just quickly pull it for you. Select * from orders_partition. Let me select that. This table looks like this. So if I sought, based on the region, you can see that the first region is Asia and then there are so on. Now I'm playing a one trick. Here I am deleting all the records where the region is equal to Asia. I will say a query, delete from orders where region equal to Asia. When I execute this, this will delete all the rules which is from Asia. But I did this by a mistake. It was not expected, right? So if I just go and see current data. Oh, I'm sorry, I have to delete from orders_partition. So let me delete this from orders_partition. This get delete. Now if we go back and execute this query again, you will see that the Asia region is gone. So there is no rules now which is showing the Asia. Got it? So I…

Contents