0
0
Snowflakecloud~10 mins

Time Travel retention periods in Snowflake - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the Time Travel retention period to 7 days for a Snowflake table.

Snowflake
ALTER TABLE my_table SET DATA_RETENTION_TIME_IN_DAYS = [1];
Drag options to blanks, or click blank then click option'
A7
B30
C0
D90
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 disables Time Travel.
Setting too high a value may increase storage costs.
2fill in blank
medium

Complete the code to query the current Time Travel retention period for a Snowflake table.

Snowflake
SHOW TABLES LIKE 'my_table'; -- Look for retention_time in the [1] column
Drag options to blanks, or click blank then click option'
Aname
Bcreated_on
Cretention_time
Downer
Attempts:
3 left
💡 Hint
Common Mistakes
Checking unrelated columns like owner or created_on.
Assuming retention period is in a different table property.
3fill in blank
hard

Fix the error in the command to disable Time Travel on a Snowflake table.

Snowflake
ALTER TABLE my_table SET DATA_RETENTION_TIME_IN_DAYS = [1];
Drag options to blanks, or click blank then click option'
A0
B-1
CNULL
DFALSE
Attempts:
3 left
💡 Hint
Common Mistakes
Using NULL or negative numbers causes errors.
Using boolean values like FALSE is invalid.
4fill in blank
hard

Fill both blanks to set Time Travel retention to 1 day and clone the table.

Snowflake
ALTER TABLE my_table SET DATA_RETENTION_TIME_IN_DAYS = [1];
CREATE TABLE my_table_clone CLONE my_table [2] (TIMESTAMP => CURRENT_TIMESTAMP());
Drag options to blanks, or click blank then click option'
A1
BAFTER
CAT
DBEFORE
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong keywords like AFTER or BEFORE for cloning.
Setting retention to invalid values.
5fill in blank
hard

Fill all three blanks to query the history of a table within its Time Travel retention period.

Snowflake
SELECT * FROM my_table [1] ([2] => CURRENT_TIMESTAMP - INTERVAL '[3] DAY');
Drag options to blanks, or click blank then click option'
AAT
BTIMESTAMP
C7
DBEFORE
Attempts:
3 left
💡 Hint
Common Mistakes
Using AT instead of BEFORE for historical queries.
Incorrect interval values or syntax.