Decide what should happen when spending rises
Maple Market has an overnight order load with a firm deadline and a development warehouse that can stop safely. The first needs a timely warning with someone responsible for it. The second can use a warehouse enforcement action. Choose the response before you choose the tool.
A Resource Monitor tracks credit usage against a quota for assigned warehouses or at account level. A notification can warn at a percentage of the quota. SUSPEND lets statements finish before suspending standard warehouses. SUSPEND_IMMEDIATE can cancel statements in progress. Adaptive Warehouses are disabled by these suspend actions. Enforcement can take time, so usage may exceed the chosen threshold.
An account-level Resource Monitor still covers warehouses. Snowflake-managed services such as Snowpipe fall outside its enforcement. Cloud Services charges can still arise after warehouse suspension. If an account and warehouse monitor both apply, either can trigger its own action.
Use budgets to see where the month is heading
A Snowflake budget tracks a monthly credit limit and can notify recipients when it projects that the limit will be exceeded. Use an account budget for supported account-wide consumption or a custom budget for a supported set of objects. Check the supported services and object types before promising coverage.
A budget’s spending limit provides monitoring. It leaves services running by default. Separately configured budget actions can run user-defined stored procedures, such as suspending a particular warehouse. Such actions need privileges, guardrails and testing. A budget evaluates periodically and warns in credits. The default refresh interval can be up to 6.5 hours. A faster refresh consumes more budget-management compute. Track storage and transfer separately for a financial budget.
Open the account Cost Management area in Snowsight for a first look at spending, then inspect the monitor and budget information available to your role. Agree who takes action when an alert arrives and who has permission to change the configuration.
| Situation | First control | Outcome |
|---|---|---|
| Development warehouse may stop | Warehouse Resource Monitor | Warn early, then suspend at a later threshold |
| Watch Snowpipe and supported compute | Account or supported custom budget | Notify recipients if monthly usage is projected over the limit |
| Production work must finish | Early notification and a response owner | Investigate before considering an interruption |
Configure and test a Resource Monitor
Use ACCOUNTADMIN in an approved sandbox with one disposable standard warehouse named M16D_DEV_WH with no existing warehouse monitor. A quota is the credit allowance over the monitor interval. At a 100-credit quota, the three sample thresholds correspond to 70, 90 and 100 monitored credits. Leave headroom because metering and actions can lag. These are guardrails for a disposable warehouse.
In Snowsight, switch to ACCOUNTADMIN and open Admin → Cost management → Resource Monitors. Create the monitor, choose the warehouse scope, set quota and schedule, add actions, and then confirm the warehouse assignment. An account assignment affects the account’s warehouses. Check for an existing account monitor first and reconcile both policies.
| Trigger | Expected action | What to verify |
|---|---|---|
| 70% | NOTIFY | Verified recipient sees the warning. |
| 90% | SUSPEND | Running statements finish before the warehouse suspends. |
| 100% | SUSPEND_IMMEDIATE | Active statements can be cancelled. |
Create, assign and inspect the warehouse monitor
IMMEDIATELY starts the custom schedule. MONTHLY defines its reset interval. NOTIFY_USERS lists up to five optional non-administrator users on a warehouse monitor. Substitute an approved, verified user and ensure their notification setup is correct. Administrators enable Resource Monitor notifications in their Snowsight profile. Inspect the trigger columns and warehouse assignment after creation.
USE ROLE ACCOUNTADMIN;
CREATE RESOURCE MONITOR M16D_DEV_MONITOR WITH
CREDIT_QUOTA = 100 FREQUENCY = MONTHLY START_TIMESTAMP = IMMEDIATELY
NOTIFY_USERS = (<VERIFIED_USER>)
TRIGGERS ON 70 PERCENT DO NOTIFY
ON 90 PERCENT DO SUSPEND
ON 100 PERCENT DO SUSPEND_IMMEDIATE;
ALTER WAREHOUSE M16D_DEV_WH SET RESOURCE_MONITOR = M16D_DEV_MONITOR;
SHOW RESOURCE MONITORS LIKE 'M16D_DEV_MONITOR';
SHOW WAREHOUSES LIKE 'M16D_DEV_WH';Choose account-wide scope only after a separate review
Use this as an alternative account-level example in a disposable account with no existing account monitor. Keep the first test notification-only. Account monitors govern user-managed warehouses, including warehouses with their own monitor. The quota does not cap serverless or storage spend. In production, report the expected impact on all scheduled jobs before assigning a monitor.
For tests, verify the assignment and threshold logic first. Check notifications and the action using a bounded pilot and representative ordinary usage. Avoid deliberately burning through a full quota. If nothing alerts, check monitored credits, schedule, scope, role and notification preferences. Use the following cleanup only for the scope you created.
-- Optional alternative in an approved disposable account.
USE ROLE ACCOUNTADMIN;
CREATE RESOURCE MONITOR M16D_ACCOUNT_MONITOR WITH CREDIT_QUOTA = 500
FREQUENCY = MONTHLY START_TIMESTAMP = IMMEDIATELY
TRIGGERS ON 80 PERCENT DO NOTIFY;
ALTER ACCOUNT SET RESOURCE_MONITOR = M16D_ACCOUNT_MONITOR;
SHOW RESOURCE MONITORS LIKE 'M16D_ACCOUNT_MONITOR';
-- After the account pilot only, confirm the lab account assignment and run separately.
-- ALTER ACCOUNT UNSET RESOURCE_MONITOR;
-- DROP RESOURCE MONITOR M16D_ACCOUNT_MONITOR;
-- After the warehouse pilot only, confirm the warehouse assignment and run separately.
-- ALTER WAREHOUSE M16D_DEV_WH UNSET RESOURCE_MONITOR;
-- DROP RESOURCE MONITOR M16D_DEV_MONITOR;Configure an account budget or a scoped custom budget
An account budget sees account credit consumption. A custom budget is useful for a team’s supported resources. It projects usage and sends a notification before expected overspend. Storage and transfer need separate financial tracking. Confirm supported resources and the monthly refresh behavior before choosing thresholds.
In Snowsight, go to Admin → Cost management → Budgets. Use Set up Account Budget for a new account budget, enter the limit and verified recipients, and finish setup. For a custom budget, select + Budget, choose its database and schema, enter limit and recipients, then select the allowed resources in Budget scope. Directly assigning an object can move it out of an existing custom budget. Check ownership and current membership first.
Set up notification delivery and the chosen budget scope
Use ACCOUNTADMIN and select an approved warehouse for the isolated example. A delegated admin can manage the account budget through SNOWFLAKE.BUDGET_ADMIN. A custom budget creator needs parent access and CREATE SNOWFLAKE.CORE.BUDGET in the schema. Adding an object through a reference requires APPLYBUDGET for that resource. Use a fresh budget name and an approved verified address. Snowflake’s application needs USAGE on the email integration to deliver notifications.
Run the common email setup and only the relevant account or custom block. For a warehouse test use a disposable warehouse that belongs to no other custom budget. To monitor a serverless workload, attach a supported object or container from that workload according to the budget scope guide. Verify GET_SPENDING_LIMIT returns 500 or 75, and the custom scope lists the intended warehouse.
USE ROLE ACCOUNTADMIN;
CREATE NOTIFICATION INTEGRATION M16D_BUDGET_EMAIL
TYPE = EMAIL ENABLED = TRUE ALLOWED_RECIPIENTS = ('<verified_email>');
GRANT USAGE ON INTEGRATION M16D_BUDGET_EMAIL TO APPLICATION SNOWFLAKE;
-- New account budget only, in an approved sandbox with no active account budget.
CALL SNOWFLAKE.LOCAL.ACCOUNT_ROOT_BUDGET!ACTIVATE();
CALL SNOWFLAKE.LOCAL.ACCOUNT_ROOT_BUDGET!SET_SPENDING_LIMIT(500);
CALL SNOWFLAKE.LOCAL.ACCOUNT_ROOT_BUDGET!SET_EMAIL_NOTIFICATIONS('M16D_BUDGET_EMAIL', '<verified_email>');
CALL SNOWFLAKE.LOCAL.ACCOUNT_ROOT_BUDGET!GET_SPENDING_LIMIT();
-- Custom budget, in an existing approved writable schema.
USE SCHEMA <LAB_DB>.<LAB_SCHEMA>;
CREATE SNOWFLAKE.CORE.BUDGET M16D_TEAM_BUDGET();
CALL M16D_TEAM_BUDGET!SET_SPENDING_LIMIT(75);
CALL M16D_TEAM_BUDGET!SET_EMAIL_NOTIFICATIONS('M16D_BUDGET_EMAIL', '<verified_email>');
CALL M16D_TEAM_BUDGET!ADD_RESOURCE(
SYSTEM$REFERENCE('warehouse', 'M16D_DEV_WH', 'SESSION', 'applybudget'));
CALL M16D_TEAM_BUDGET!GET_SPENDING_LIMIT();
CALL M16D_TEAM_BUDGET!GET_LINKED_RESOURCES();Verify recipient, forecast and cleanup
Check the budget forecast after its scheduled refresh and confirm that projected overage, rather than a single spend reading, drives the default notification. A delayed forecast is not proof of a broken email. Check verified recipients, enabled notification integration, assigned resources and elapsed refresh time. Leave custom actions off in this pilot.
Only remove the sandbox budget you created. If the account branch was used, deactivating the sandbox account budget resets its settings and can affect Snowsight custom-budget creation. Do not deactivate an existing account budget. Drop the test integration after neither pilot budget needs it.
-- Run only the cleanup for the scope you created.
DROP SNOWFLAKE.CORE.BUDGET <LAB_DB>.<LAB_SCHEMA>.M16D_TEAM_BUDGET;
CALL SNOWFLAKE.LOCAL.ACCOUNT_ROOT_BUDGET!DEACTIVATE();
DROP NOTIFICATION INTEGRATION M16D_BUDGET_EMAIL;Explain the decision in an interview
Start with the rule, then say what you would check in a real account.
Which control would you use to stop a runaway development warehouse?
I would use a Resource Monitor and agree whether running work should finish or be cancelled. I would add a Budget if I also need forecasts for supported serverless consumption.
Can a monthly budget guarantee the next credit is blocked?
I treat it as credit monitoring with periodic evaluation. The default notification leaves the resources running. Separately configured actions need their own review and tests.
Why can spend exceed a monitor quota?
The action can lag the usage measurement, and SUSPEND lets running work finish. Other services can fall outside the monitor, so I leave headroom and reconcile the bill separately.
Words used in this lesson
- Resource Monitor
- Warehouse credit tracking with configurable notification and enforcement actions.
- Budget
- Monthly monitoring and forecasting for supported credit consumption.
- Quota
- The credit amount used to calculate monitor trigger percentages.
See how it works
Choose a step to explore the idea at your own pace.
Open the interactive explanation
Set cost alerts with Resource Monitors and budgets
Protect the sandbox
For a 100-credit development quota, warn at 70 credits and let in-flight statements finish at the 90-credit suspend threshold.
Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.
Read the complete diagram explanation
- Protect the sandbox
For a 100-credit development quota, warn at 70 credits and let in-flight statements finish at the 90-credit suspend threshold.
70 credits: warn → 90 credits: suspend → Allow running work to finish
- Watch the ingestion forecast
Configure a supported budget and route the warning to the ingestion owner. Review projected spending before taking action.
Snowpipe usage → Budget forecast → Owner responds
Try the SQL or command
Read → predict → run in your learning environment → compare. You can also learn by reading without an account.
New to SQL? Where to run it and how to read it
A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.
- No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
- For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
- Read the entire example, including comments beginning with
--. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor. - Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
- SELECT / FROM
- Choose the values to return / identify their input.
- VALUES / COLUMN1
- VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
- AS / WITH
- AS gives a result a readable name. WITH names a temporary query step within one statement.
- NULL / ::
- NULL means missing or unknown. The :: notation converts a value to a named data type.
- Session
- One connection and its settings. Keep related transaction steps in the same session.
- Database.schema.table
- A full address for stored data. It is separate from the warehouse that processes queries.
Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →
Help with common practice errors
- No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
- Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
- Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
- Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.
Read existing Resource Monitors
SHOW RESOURCE MONITORS;What to expect and why
With a role authorized to view the monitor, compare credit_quota, used_credits and the notification and suspension columns. For a fictional 100-credit quota, a notification at 70% is reached at 70 credits. A suspend trigger at 90% is reached at 90 credits. SHOW reads configuration and does not apply either action.
Check your understanding
Choose an answer, then check your reasoning. This is practice, not a scored test.
Try it yourself
A Snowpipe feed drives a projected overage. Explain which control can surface it and who should respond.
Compare your reasoning
A budget covering the supported Snowpipe usage can notify the team. The ingestion owner checks the incoming volume and retries, then decides how to respond with the business owner.
Official sources and curriculum
Module 16 · See module scope
By Rohit Ray · Independent educational lesson · Explore this visual lab