SnowPro Associate: Platform Question 333
Single answer4.0 Data Protection and Data SharingA company accidentally ran a DELETE statement against a Snowflake table named SALES_TXN at 10:05 AM, removing several thousand rows. At 10:20 AM, the data engineer confirms the mistake and needs to restore the table to its state just before the DELETE. The company also wants to avoid restoring the entire database or contacting Snowflake Support. Which action should the engineer take?
- A
Use Time Travel to create or replace the SALES_TXN table from a point before 10:05 AM.
- B
Use Fail-safe to immediately recover the deleted rows directly into the existing table.
- C
Use data sharing to retrieve the missing rows from a consumer account that queried the table earlier.
- D
Use a warehouse cache snapshot to rebuild the deleted rows from the last successful query.
Show answer and explanation
Correct answer: A
Explanation
This question tests practical knowledge of Snowflake data protection capabilities. For recent accidental DML changes like DELETE, UPDATE, or DROP, the correct first response is typically Time Travel, provided the object is still within its retention period. Time Travel supports querying, cloning, and restoring historical data states for supported objects. Fail-safe exists after Time Travel but is not intended for routine operational recovery and is managed by Snowflake rather than directly by users. Secure Data Sharing allows live read-only access to provider data without copying it, so it does not serve as a backup strategy. Similarly, warehouse cache is a performance feature, not a data protection feature. These distinctions align with Snowflake best practices and documentation for Time Travel, Fail-safe, and Secure Data Sharing.
- A. Correct.
Correct. Time Travel is designed to access historical data for Snowflake objects such as tables within the configured data retention period. In this scenario, the engineer can restore the table to a state before the accidental DELETE by using Time Travel, such as recreating the table from a timestamp or offset before 10:05 AM. This is the standard self-service recovery mechanism for recent accidental data changes.
- B. Incorrect.
Incorrect. Fail-safe is not intended for immediate, user-driven point-in-time recovery. Fail-safe is a Snowflake-managed recovery mechanism used after the Time Travel retention period has expired, and recovery requires Snowflake involvement. It is intended for disaster recovery scenarios, not routine correction of recent user errors.
- C. Incorrect.
Incorrect. Secure data sharing does not provide a historical recovery mechanism for a provider's accidentally deleted data. A consumer account querying shared data does not maintain an independent copy of the provider's table for the provider to restore from. Sharing grants live access to data objects; it is not a backup or recovery solution.
- D. Incorrect.
Incorrect. Warehouse cache improves query performance by caching data locally for compute, but it is not a durable backup, snapshot, or recovery feature. Cached data cannot be used as a supported method to reconstruct deleted rows.