0
0
Snowflakecloud~30 mins

Resource monitors for cost control in Snowflake - Mini Project: Build & Apply

Choose your learning style9 modes available
Resource monitors for cost control
📖 Scenario: You are managing a Snowflake cloud data warehouse for a small company. To avoid unexpected high costs, you want to set up resource monitors that track and control credit usage.
🎯 Goal: Create a resource monitor in Snowflake that tracks credit usage, set a threshold, and configure actions to control costs.
📋 What You'll Learn
Create a resource monitor named cost_monitor with a credit quota of 100
Set the credit quota to 100 credits
Set the trigger threshold to 80% of the quota
Configure the monitor to notify the account admins when the threshold is reached
Configure the monitor to suspend warehouses when the quota is exceeded
💡 Why This Matters
🌍 Real World
Resource monitors help companies avoid unexpected cloud costs by tracking and controlling credit usage in Snowflake.
💼 Career
Cloud engineers and data platform administrators use resource monitors to manage budgets and ensure cost efficiency.
Progress0 / 4 steps
1
Create the resource monitor
Create a resource monitor named cost_monitor with a credit quota of 100 credits.
Snowflake
Need a hint?

Use the CREATE RESOURCE MONITOR statement with the CREDIT_QUOTA option.

2
Set the trigger threshold
Alter the resource monitor cost_monitor to set the trigger threshold to 80 percent of the quota.
Snowflake
Need a hint?

Use ALTER RESOURCE MONITOR and SET TRIGGERS AT 80 PERCENT to set the threshold.

3
Configure notification action
Alter the resource monitor cost_monitor to notify the account admins when the threshold is reached using NOTIFY_ROLES = ('ACCOUNTADMIN').
Snowflake
Need a hint?

Use SET NOTIFY_ROLES = ('ACCOUNTADMIN') to notify admins.

4
Configure suspend action on quota exceed
Alter the resource monitor cost_monitor to suspend warehouses when the quota is exceeded using SET SUSPEND AT 100 PERCENT.
Snowflake
Need a hint?

Use ALTER RESOURCE MONITOR cost_monitor SET SUSPEND = TRUE AT 100 PERCENT to suspend warehouses on quota exceed.