Using Time Travel to return to the state of data at a particular time
In this recipe, we will go back to a point in time for a table or a set of tables and query the data at that time using the Time Travel functionality.
Getting ready
You will need to be connected to your Snowflake instance via the web UI or the SnowSQL client to execute this recipe.
How to do it…
We will be creating a table and populating that table with some sample data. Further on in the recipe, we will run an update on this table and demonstrate how to recover to a point before the data was updated. The steps are as follows:
- We will create a new database, followed by creating a table containing some sample customer data. We will be using sample data provided by Snowflake to populate this table. To do so, run the following SQL:
CREATE DATABASE C8_R1; CREATE TABLE CUSTOMER AS SELECT * FROM SNOWFLAKE_SAMPLE_DATA.TPCDS_SF10TCL.  CUSTOMER LIMIT 100000;
- Let's validate that...