Snowflake Time Travel


First thing first Before embarking on any Time Travel, it is best to set the Session Timezone to your Timezone

ALTER SESSION SET TIMEZONE = 'America/Los_Angeles'

Going back in time to a specific time If you want to look at the data at a specific time, you can use the following to time-travel

select * from orders at(timestamp => '2022-01-01 12:12:12.120'::timestamp);

Time travel relative to current time If you want to travel back relative to the current time, you can use the following. In case we are going back 5 mins from the current time.

select * from orders AT(OFFSET => -60*5)