nerdexam
Snowflake

DEA-C02 · Question #115

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…

The correct answer is D. The DATA_RETENTION_TIME_IN_DAYS will remain the same for both the orders table and the. Option D is correct because changing DATA_RETENTION_TIME_IN_DAYS at the schema level does not retroactively update existing tables. The orders table was created with an explicit table-level override of 5 days - table-level settings always take precedence over schema-level…

Security and Governance

Question

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?

Options

  • AThe DATA_RETENTION_TIME_IN_DAYS cannot be set at the schema level, so the command will
  • BThe DATA_RETENTION_TIME_IN_DAYS on the orders table will not change, but on the final
  • CThe DATA_RETENTION_TIME_IN_DAYS will be set at = 20 for both the orders table and the
  • DThe DATA_RETENTION_TIME_IN_DAYS will remain the same for both the orders table and the

How the community answered

(32 responses)
  • A
    6% (2)
  • B
    6% (2)
  • C
    16% (5)
  • D
    72% (23)

Explanation

Option D is correct because changing DATA_RETENTION_TIME_IN_DAYS at the schema level does not retroactively update existing tables. The orders table was created with an explicit table-level override of 5 days - table-level settings always take precedence over schema-level settings, so it remains at 5. The final table inherited the schema's value of 10 at the time of its creation; since schema-level changes do not propagate backward to existing objects, it also remains at 10. Only tables created after the schema is updated to 20 would inherit the new value.

Why the distractors are wrong:

  • A is incorrect because Snowflake absolutely supports setting DATA_RETENTION_TIME_IN_DAYS at the schema level - it's a valid and common configuration.
  • B is incorrect because while orders correctly stays at 5, final does not automatically update to 20; existing tables are not retroactively affected by schema-level changes.
  • C is incorrect because orders has an explicit table-level value of 5, which cannot be overridden by a schema-level change alone - you would need an explicit ALTER TABLE command.

Memory tip: Think "creation-time snapshot" - a table locks in its retention value (whether explicit or inherited) when it's created. Schema-level changes only affect future tables. To change an existing table's retention, you must ALTER TABLE it directly.

Topics

#Time Travel#Data Retention#Schema Properties#Table Properties

Community Discussion

No community discussion yet for this question.

Full DEA-C02 Practice