COF-C03 Question 201
Single answerResource MonitorsA Snowflake administrator needs to prevent a non-production analytics warehouse from consuming more than its monthly credit budget. The business requirement is to receive notifications when usage reaches 75% of the budget and to automatically stop further warehouse compute usage when the budget is fully consumed. Which approach best meets this requirement?
- A
Create a resource monitor with a monthly frequency, set a notify trigger at 75%, set a suspend trigger at 100%, and assign the monitor to the warehouse.
- B
Create a warehouse quota on the analytics warehouse, set an alert at 75%, and enable auto-suspend at 100% of the quota.
- C
Create a resource monitor on the database used by the analytics team, set a monthly quota, and configure it to suspend queries at 100%.
- D
Create a task that queries ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY every hour and manually alters the warehouse to suspended when usage reaches the limit.
Show answer and explanation
Correct answer: A
Explanation
Resource monitors are the native Snowflake mechanism for tracking and controlling credit consumption for warehouses. They can be set with a credit quota and a schedule such as monthly, and they support actions at thresholds including NOTIFY, SUSPEND, and SUSPEND_IMMEDIATE. To meet the stated requirement, the administrator should create a resource monitor with a monthly quota, configure a notification threshold at 75%, configure suspension at 100%, and assign it to the non-production warehouse. This aligns with Snowflake documentation and best practices for controlling spend on development or departmental workloads. Common misconceptions include confusing warehouse auto-suspend with budget enforcement, assuming monitors can be attached to databases, or building custom monitoring logic when a native feature already exists.
- A. Correct.
Correct. Resource monitors are the Snowflake feature designed to track and control credit usage for warehouses. A monitor can be configured with a monthly quota, a NOTIFY trigger at 75%, and a SUSPEND trigger at 100%. When assigned to a specific warehouse, it governs credit consumption for that warehouse and can automatically suspend it once the defined threshold is reached.
- B. Incorrect.
Incorrect. Snowflake does not provide a separate warehouse quota feature with built-in alert and hard-stop behavior outside of resource monitors. Auto-suspend on a warehouse is an inactivity setting, not a credit-budget enforcement mechanism. This option mixes real warehouse behavior with non-existent quota functionality.
- C. Incorrect.
Incorrect. Resource monitors apply to warehouses or the account, not to databases. They track compute credit consumption, not database-level storage or object usage. Also, the action is to suspend warehouses, not directly suspend queries on a database.
- D. Incorrect.
Incorrect. While a custom task-based solution could be built to monitor usage, it is not the best approach because Snowflake already provides native resource monitors for this exact use case. A task also introduces delay, operational complexity, and maintenance overhead compared to using built-in quota actions and notifications.