SOL-C01 · Question #72
A junior data analyst accidentally dropped a schema named 'STAGING' in the 'RAW DATA' database. They need to recover the schema and its contents as quickly as possible. Which of the following approach
The correct answer is A. Use the `UNDROP SCHEMA STAGING;' command within the 'RAW DATA' database context.. UNDROP SCHEMA STAGING; is correct because Snowflake's Time Travel feature provides a direct, surgical recovery command that restores the schema and all its objects (tables, views, stages, etc.) in a single operation - no data loss, no manual reconstruction. Option B is wrong beca
Question
A junior data analyst accidentally dropped a schema named 'STAGING' in the 'RAW DATA' database. They need to recover the schema and its contents as quickly as possible. Which of the following approaches would be the MOST efficient and reliable way to achieve this, assuming Time Travel is enabled for the account and the retention period is sufficient?
Options
- AUse the `UNDROP SCHEMA STAGING;' command within the 'RAW DATA' database context.
- BCreate a new schema named 'STAGING' and manually restore the tables and views from a
- CRestore the entire 'RAW DATA' database to a point in time before the schema was dropped using
- DCreate a clone of the database at a point in time before the schema was dropped, then rename the
- EUse the `RECOVER DATABASE RAW DATA;' command to recover the entire database.
How the community answered
(23 responses)- A52% (12)
- B9% (2)
- C9% (2)
- D26% (6)
- E4% (1)
Explanation
UNDROP SCHEMA STAGING; is correct because Snowflake's Time Travel feature provides a direct, surgical recovery command that restores the schema and all its objects (tables, views, stages, etc.) in a single operation - no data loss, no manual reconstruction. Option B is wrong because manually recreating objects is error-prone, time-consuming, and likely to result in data loss since table data isn't recoverable that way. Option C is wrong because restoring the entire database is far too broad - it would overwrite all changes made to other schemas since the drop, causing collateral damage. Option D is similarly overkill; cloning the database and renaming objects is a multi-step workaround that risks overwriting recent legitimate changes. Option E is a distractor - RECOVER DATABASE is not a valid Snowflake command at all.
Memory tip: Think of UNDROP as Snowflake's "Ctrl+Z" - it targets exactly what you dropped (table, schema, or database) and reverses it precisely. Match the command to the object level: dropped a schema, UNDROP SCHEMA; dropped a table, UNDROP TABLE. Always use the most targeted recovery tool available.
Topics
Community Discussion
No community discussion yet for this question.