QuestionQ25

VerifiedOfficial exam objectives/topics

A table is created under MY_SCHEMA:

CREATE TABLE my_schema.orders (  
  order_id INT,  
  order_item_nr INT  
) DATA_RETENTION_TIME_IN_DAYS = 5;  

The DATA_RETENTION_TIME_IN_DAYS value on the schema is reset to 10.

A new table is then created under MY_SCHEMA:

CREATE TABLE my_schema.final (  
  final_order_id INT,  
  final_order_item_nr INT  
);  

What happens if the Time Travel DATA_RETENTI0N_TIME_IN_DAYS value at the schema level is changed from 10 to 20?

Explanation

An explicitly configured table-level DATA_RETENTION_TIME_IN_DAYS value takes precedence over a schema value, so orders remains at 5 days. A table without an explicit retention period inherits the schema’s current setting; therefore, final inherits 20 days after the schema-level value changes. Snowflake documents that changing retention at the schema level changes the value for tables in that schema that do not have an explicit retention period.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!