SnowPro Advanced: Security Engineer Question 176
Single answerManage the data lifecycle using object lifecycle management features:A financial services company stores highly sensitive customer data in Snowflake and must enforce the following lifecycle controls for a table named PAYMENT_EVENTS: (1) analysts must be able to recover from accidental row changes for a limited period, (2) after that recovery window, the data must remain available only for compliance investigations for several months, and (3) after the compliance period, the data must no longer be recoverable by Snowflake features. The company also wants to minimize storage cost while meeting these requirements. Which configuration best satisfies the requirement?
- A
Set a short DATA_RETENTION_TIME_IN_DAYS on the table to support Time Travel for the limited recovery window, and rely on Fail-safe for the additional compliance investigation period before Snowflake permanently removes the data.
- B
Set MAX_DATA_EXTENSION_TIME_IN_DAYS on the table to the number of months required for compliance investigations, because this extends how long historical data can be queried after Time Travel ends.
- C
Create a masking policy on the table and leave the default retention settings, because masked historical data remains available for investigations without requiring longer lifecycle retention.
- D
Disable Time Travel on the table to reduce cost, and use replication to another account as the compliance investigation copy until the data is no longer needed.
Show answer and explanation
Correct answer: A
Explanation
The best answer is to use Snowflake's native lifecycle controls as designed: configure DATA_RETENTION_TIME_IN_DAYS for the operational recovery window, then rely on the platform-managed Fail-safe period before permanent removal. This directly maps to the scenario's three phases: user-accessible recovery via Time Travel, limited post-Time Travel recoverability during Fail-safe, and eventual irreversible deletion after Fail-safe expires. For cost optimization, a shorter Time Travel period reduces storage overhead compared with keeping a long retention window. MAX_DATA_EXTENSION_TIME_IN_DAYS is often misunderstood; it primarily helps prevent streams from becoming stale and is not a substitute for retention-based lifecycle management. Masking policies address data visibility, not retention. Replication supports availability and DR objectives, but it does not replace lifecycle retention features for this requirement. See Snowflake documentation for Time Travel, Fail-safe, table parameters such as DATA_RETENTION_TIME_IN_DAYS, and stream staleness behavior related to MAX_DATA_EXTENSION_TIME_IN_DAYS.
- A. Correct.
Correct. Snowflake object lifecycle management uses Time Travel for a configurable recovery window and Fail-safe for a fixed additional recovery period managed by Snowflake. Setting a shorter DATA_RETENTION_TIME_IN_DAYS minimizes Time Travel storage while still allowing analysts to recover from accidental changes during the required period. After Time Travel ends, Fail-safe provides an additional period during which Snowflake can recover historical data for exceptional situations, which can align with an investigation or compliance need. After Fail-safe expires, the data is no longer recoverable through Snowflake lifecycle features.
- B. Incorrect.
Incorrect. MAX_DATA_EXTENSION_TIME_IN_DAYS does not extend Time Travel or create a compliance archive window for user queries. It is used to protect streams from becoming stale by allowing Snowflake to extend retention in limited circumstances. It is not a general-purpose historical retention setting for lifecycle management.
- C. Incorrect.
Incorrect. Masking policies control how data is presented to roles at query time; they do not manage object lifecycle, historical retention, or recoverability windows. Leaving default retention settings may not meet the stated requirement for a specific limited recovery period followed by a longer compliance-only period.
- D. Incorrect.
Incorrect. Replication is for business continuity and disaster recovery use cases, not a direct substitute for Time Travel plus Fail-safe lifecycle controls. Disabling Time Travel removes the analyst recovery capability required in the scenario. Replication also does not inherently define the same recovery semantics or guaranteed removal timing requested here.