Time Travel Flashcards
What tasks can be done via Time Travel
Restoring data related objects (tables, schemas, and databases) that might have been deleted accidentally or on purpose
Duplicating and backing up data from key points in the past
Querying data in the past that has since been updated or deleted
Analyzing data usage/manipulation over specific periods of time
How do you query data using time travel
select from table <table> at | before
How do you create a new object using time travel
create table …. clone …. at | before
create schema …. clone … at | before
create database … clone … at |before
How do you bring back a deleted object using time travel
undrop database …
undrop schema …
undrop table …
What is the standard retention period automatically enabled on all accounts
1 day (24 hours)
T/F for the standard and enterprise accounts, the retention period can be set to 0
True
For permanent databases, schemas, and tables, what is the retention period that can be set
0 - 90 days
When the retention period ends for an object, the historical data is moved in to…
Snowflake Fail Safe
Once objects are moved into fail safe, what options are no longer available
Historical data is no longer available for querying
Past objects can no longer be cloned
Past objects that were cloned can no longer be restored
What snowflake editions allow for time travel beyond 1 day
Enterprise
Which of the following ALTER commands will impact a column’s availability in Time Travel?
A. ALTER TABLE … SET DATA TYPE …
B. ALTER TABLE … RENAME COLUMN …
C. ALTER TABLE … SET NOT NULL …
D. ALTER TABLE … DROP COLUMN …
A.
What is the param to set the time travel number of days
DATA_RETENTION_TIME_IN_DAYS
How is the retention days for an object determined when MIN_DATA_RETENTION_TIME_IN_DAYS is set
MAX(DATA_RETENTION_TIME_IN_DAYS, MIN_DATA_RETENTION_TIME_IN_DAYS)
T/F Time Travel can be disabled on the account level
False - It can only be set to 0 Days retention. This can be overridden at the object level
T/F when a database is dropped, the retention periods for the schema and the tables are not honored if they are different
True. If you want them to be honored, they have to be dropped before the entire database