QuestionQ50

Implement Data Protection and Recovery

A table is created in MY_SCHEMA:

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

The schema-level DATA_RETENTION_TIME_IN_DAYS value is reset to 10.

A new table is then created in MY_SCHEMA:

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

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

Explanation

A table-level DATA_RETENTION_TIME_IN_DAYS setting takes precedence over inherited schema settings, so orders remains at its explicitly configured value of 5. Tables without an explicitly set retention period inherit schema-level changes; therefore, final changes from its inherited value of 10 to 20.

Learn more

Community Discussion

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