In Snowflake time travel, if a schema has DATA_RETENTION_TIME_IN_DAYS = 10 and a table inside it has DATA_RETENTION_TIME_IN_DAYS = 20, and then you drop the schema, what data retention value will be honored for the table when retrieving the table's data?

Master Snowflake Data Engineer Exam. Study with flashcards and multiple choice questions, each question includes hints and explanations. Prepare for your success!

Multiple Choice

In Snowflake time travel, if a schema has DATA_RETENTION_TIME_IN_DAYS = 10 and a table inside it has DATA_RETENTION_TIME_IN_DAYS = 20, and then you drop the schema, what data retention value will be honored for the table when retrieving the table's data?

Explanation:
Time travel retention in Snowflake respects the smallest retention setting that applies to an object and its ancestors. A table can have its own retention value, and the schema it sits in can also specify one. The effective window for time travel is the minimum of these values. Here, the schema is set to 10 days while the table inside it has 20 days. The table’s longer setting does not extend the recoverable window because the schema’s shorter retention governs the overall time travel allowance. Therefore, the data can be retrieved up to 10 days back. Dropping the schema doesn’t reset this behavior; the recoverable period is still limited by the lower retention that was in effect for that table’s location. Hence, 10 days is the value honored for retrieving the table’s data.

Time travel retention in Snowflake respects the smallest retention setting that applies to an object and its ancestors. A table can have its own retention value, and the schema it sits in can also specify one. The effective window for time travel is the minimum of these values.

Here, the schema is set to 10 days while the table inside it has 20 days. The table’s longer setting does not extend the recoverable window because the schema’s shorter retention governs the overall time travel allowance. Therefore, the data can be retrieved up to 10 days back.

Dropping the schema doesn’t reset this behavior; the recoverable period is still limited by the lower retention that was in effect for that table’s location. Hence, 10 days is the value honored for retrieving the table’s data.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy