SnowPro Associate: Platform Question 332
Single answer4.0 Data Protection and Data SharingA retail company accidentally ran a DELETE statement against a production SALES table at 2:00 PM, removing several thousand rows. At 2:20 PM, the data engineering team discovers the issue. The team wants to recover the deleted data as quickly as possible without restoring the entire database or involving external backups. Which Snowflake feature should they use?
- A
Use Time Travel to query or restore the SALES table to a point before 2:00 PM
- B
Use Fail-safe to immediately restore the deleted rows back into the SALES table
- C
Create a secure data share from another account that contains the missing data
- D
Use database replication to roll back the SALES table to its previous state
Show answer and explanation
Correct answer: A
Explanation
The best answer is to use Time Travel. In Snowflake, Time Travel enables access to historical data for objects such as tables, schemas, and databases during the configured retention period. This supports practical recovery scenarios like accidental DELETE, UPDATE, or DROP operations. Candidates should distinguish Time Travel from Fail-safe: Time Travel is customer-accessible for short-term recovery, while Fail-safe is a Snowflake support-driven mechanism after Time Travel expires. Secure Data Sharing is for sharing live data, not recovering lost data, and replication is for cross-region/account resilience rather than quick point-in-time correction of a single table. This aligns with Snowflake documentation on Data Protection features, especially Time Travel and Fail-safe best practices.
- A. Correct.
Correct. Time Travel is designed for exactly this type of scenario: recovering data that was changed or deleted within the configured retention period. The team can use Time Travel to query historical data or restore the table to a point before the DELETE occurred, without restoring the entire database. This is the fastest built-in option for recent accidental data loss.
- B. Incorrect.
Incorrect. Fail-safe is not intended for self-service, immediate recovery by users. It is a Snowflake-managed recovery mechanism available after the Time Travel period has expired, primarily for disaster recovery situations. It does not provide direct, on-demand row-level restoration by the customer.
- C. Incorrect.
Incorrect. Secure data sharing allows live sharing of database objects across accounts without copying data, but it does not function as a recovery mechanism for accidental deletes in the source table. Unless another account already has access to an unaffected source object, creating a share would not restore the lost rows.
- D. Incorrect.
Incorrect. Replication is used for business continuity and disaster recovery across regions or accounts, not as a table-level rollback feature for a recent accidental DELETE in the primary environment. It also would not be the simplest or fastest approach for this scenario.