SnowPro Advanced: Data Engineer — Question 120
A table was 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.
Then a new table is created under MY_SCHEMA:
CREATE TABLE my_schema.final( final_order_id INT, final_order_item_nr INT);
What will happen if the Time Travel DATA_RETENTION_TIME_IN_DAYS value at the schema level is changed from = 10 to = 20?
Answer options
- A. The DATA_RETENTION_TIME_IN_DAYS cannot be set at the schema level, so the command will fail.
- B. The DATA_RETENTION_TIME_IN_DAYS on the orders table will not change, but on the final table it will change to = 20.
- C. The DATA_RETENTION_TIME_IN_DAYS will be set at = 20 for both the orders table and the final table.
- D. The DATA_RETENTION_TIME_IN_DAYS will remain the same for both the orders table and the final table.
Correct answer: B
Explanation
The correct answer is B because the DATA_RETENTION_TIME_IN_DAYS setting applies to new tables created after the change. The existing orders table retains its original retention setting of 5 days, while the new final table adopts the updated setting of 20 days. Options A, C, and D are incorrect as they misrepresent how schema-level settings affect existing tables.