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 - SQL Tutorial
From the course: Manage and Optimize Big Data with Apache Iceberg
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.