SnowPro Associate: Platform exam dumps

SnowPro Associate: Platform practice question 165 of 367

SnowPro® Associate: Platform Certification. Associate level, Snowflake. Free question with the correct answer and a full explanation.

SnowPro Associate: Platform Question 165

Single answer● Create and drop schemas

A data engineering team created a temporary development schema named DEV_TEST in the ANALYTICS database to validate a new ingestion process. The testing is complete, and the team wants to remove the schema and everything inside it in a single step. When the engineer runs DROP SCHEMA ANALYTICS.DEV_TEST;, Snowflake returns an error because the schema is not empty. Which statement should the engineer use to meet the requirement?

  1. A

    DROP SCHEMA ANALYTICS.DEV_TEST CASCADE;

  2. B

    DROP DATABASE ANALYTICS.DEV_TEST;

  3. C

    TRUNCATE SCHEMA ANALYTICS.DEV_TEST;

  4. D

    DROP SCHEMA ANALYTICS.DEV_TEST RESTRICT;

Show answer and explanation

Correct answer: A

Explanation

To remove a non-empty schema in Snowflake, the correct approach is DROP SCHEMA <db_name>.<schema_name> CASCADE. By default, or when using RESTRICT, Snowflake does not allow a schema to be dropped if it still contains objects. CASCADE is specifically intended for this administrative cleanup scenario. This aligns with Snowflake SQL command behavior for dropping containers such as schemas and databases: RESTRICT blocks deletion of non-empty objects, while CASCADE removes dependent or contained objects as part of the drop operation. In practice, engineers should use CASCADE carefully in non-production environments or after confirming that all contained objects can be safely removed.

  • A. Correct.

    Correct. In Snowflake, DROP SCHEMA ... CASCADE drops the schema and all objects contained within it. This is the appropriate command when the schema is not empty and the goal is to remove the schema and its contents in one step.

  • B. Incorrect.

    Incorrect. DROP DATABASE is used to drop an entire database, not a schema within a database. Also, ANALYTICS.DEV_TEST is a database-and-schema reference, not a valid database name in this context.

  • C. Incorrect.

    Incorrect. Snowflake does not support a TRUNCATE SCHEMA command. TRUNCATE applies to tables, not schemas. This option reflects a common misconception based on table-level operations.

  • D. Incorrect.

    Incorrect. RESTRICT prevents a schema from being dropped if it contains objects. Since the engineer already received an error because the schema is not empty, using RESTRICT would not solve the problem.

Timed practice exam

Take a SnowPro Associate: Platform practice test under exam conditions

65 questions in 85 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam