0
0
Snowflakecloud~20 mins

Undrop for recovering dropped objects in Snowflake - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Snowflake Undrop Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
Recovering a dropped table using UNDROP

You dropped a table named sales_data in Snowflake. You want to recover it using the UNDROP command. Which of the following commands will successfully restore the table?

AUNDROP TABLE sales_data;
BUNDROP TABLE sales_data COPY;
CUNDROP TABLE sales_data REPLACE;
DUNDROP TABLE IF EXISTS sales_data;
Attempts:
2 left
💡 Hint

Think about the basic syntax to restore a dropped table without additional clauses.

🧠 Conceptual
intermediate
1:30remaining
Understanding the retention period for undropping objects

After dropping a table in Snowflake, how long is the dropped table available for recovery using UNDROP by default?

A90 days
B7 days
C1 day
D30 days
Attempts:
2 left
💡 Hint

Think about the default data retention period Snowflake provides for dropped objects.

security
advanced
2:00remaining
Permissions required to undrop a dropped object

Which role or permission is required to successfully execute UNDROP on a dropped table in Snowflake?

AAny role with SELECT privilege on the database
BOnly the ACCOUNTADMIN role
COwnership on the dropped object or the schema
DOnly the SYSADMIN role
Attempts:
2 left
💡 Hint

Consider who controls the object or schema ownership in Snowflake.

Configuration
advanced
2:00remaining
Recovering a dropped schema with multiple objects

You dropped a schema named analytics that contained multiple tables and views. Which command will restore the entire schema and all its objects?

ARESTORE SCHEMA analytics;
BUNDROP DATABASE analytics;
CUNDROP SCHEMA analytics REPLACE;
DUNDROP SCHEMA analytics;
Attempts:
2 left
💡 Hint

Think about the correct object type to undrop when recovering a schema.

Best Practice
expert
3:00remaining
Handling undrop failures due to name conflicts

You try to undrop a dropped table named customers, but a new table with the same name already exists in the schema. What is the best way to recover the dropped table without losing data?

ARename or drop the existing table, then run <code>UNDROP TABLE customers;</code>
BUse <code>UNDROP TABLE customers REPLACE;</code> to overwrite the existing table
CRun <code>UNDROP TABLE customers COPY;</code> to create a copy with a new name
DUndrop is not possible if a table with the same name exists; restore from backup instead
Attempts:
2 left
💡 Hint

Consider how Snowflake handles object name conflicts during undrop.