❄️
Data Flakes

Back

Happy end of January! It’s that time of year when annual budgets are finalized, and finance teams start sending emails asking, “Why did our cloud spend spike on January 3rd?” (Answer: We were testing AI models, sorry!).

Cost governance in Snowflake has evolved. We used to rely solely on Resource Monitors, which are great but blunt instruments. In 2025, we have the Budgets feature, which provides a more intelligent, alert-driven approach. Let’s look at how to set up Cost Governance 2.0.

The Old Way: Resource Monitors#

Resource Monitors are still useful. They are the “kill switch”. You set a quota (e.g., 100 credits/month) on a warehouse, and if it hits 110%, the warehouse suspends immediately.

Pros: Hard limit. No surprise bills. Cons: Hard limit. Your ETL pipeline dies halfway through the night run because it hit 100.01%, and now the CEO’s dashboard is empty.

The New Way: Snowflake Budgets#

Budgets (available in Snowsight) works differently. It monitors credit usage of a group of objects (warehouses, databases, tasks) and uses ML to forecast if you are going to exceed your limit.

Instead of just killing the process, it notifies you before you run out of money.

Setting up a Custom Budget#

You can set up a budget for a specific project (e.g., “Marketing Analytics”).

-- 1. Create a Budget
USE SCHEMA SNOWFLAKE.LOCAL;
CREATE BUDGET marketing_budget
    SPENDING_LIMIT = 500; -- Credits per month

-- 2. Add Resources to the Budget
CALL marketing_budget!ADD_RESOURCE(
    SYSTEM$REFERENCE('WAREHOUSE', 'MARKETING_WH')
);

CALL marketing_budget!ADD_RESOURCE(
    SYSTEM$REFERENCE('DATABASE', 'MARKETING_DB')
); -- Tracks storage + serverless tasks in this DB
sql

Reference vs. Account Budgets#

  • Account Budget: Tracks the total spend of the entire Snowflake account. You should have this set up by default notifying the admin team.
  • Custom Budgets: Assign specific warehouses to specific teams. This enables Chargeback models (or at least “Shameback” models where you can show a team they blew their budget).

Automated Action with Alerts#

What if you want to be proactive but not destructive? You can combine Alerts with your monitoring queries.

Best Practices Checklist for 2025#

  1. Enable the Account Budget: Set a realistic monthly forecast.
  2. Tag Resources: Use ALTER WAREHOUSE ... SET TAG cost_center = 'Marketing' to make reporting easier.
  3. Auto-Suspend Tuning: Ensure all warehouses are set to auto-suspend after 60 seconds (unless you have a specific reason otherwise/caching requirements).
  4. Statement Timeouts: Set STATEMENT_TIMEOUT_IN_SECONDS to something reasonable (e.g., 2-4 hours) so a runaway Cartesian join doesn’t run for 24 hours.

Conclusion#

Cost governance isn’t about stopping people from using data; it’s about preventing waste. By moving from simple cut-offs to forecasted budgets, we can enable our teams to experiment with high-power compute (like AI) while ensuring we don’t accidentally bankrupt the department.

Disclaimer

The information provided on this website is for general informational purposes only. While we strive to keep the information up to date and correct, there may be instances where information is outdated or links are no longer valid. We make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability, or availability with respect to the website or the information, products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk.