# Snowflake Steady Baseline, Consider Capacity Pricing

> Covers Snowflake accounts with a steady baseline above 10 credits a day over 90 days; no findings are raised until that baseline is tied to an account.

Source: https://zop.dev/integrations/snowflake/recommendations/snowflake-steady-baseline-consider-capacity-pricing

---

## On Demand is the list price for usage you could predict

Snowflake sells credits two ways, as described on the [editions page](https://docs.snowflake.com/en/user-guide/intro-editions):
On Demand, which is usage-based with no long-term commitment, and Capacity, which is discounted
pricing in exchange for an upfront commitment. The account's edition and region also set the unit
cost, and the [overall cost guide](https://docs.snowflake.com/en/user-guide/cost-understanding-overall) notes that storage
rates differ between Capacity and On Demand accounts too.

A floor of daily usage that never goes away (scheduled ELT, always-on dashboards, nightly batch) is
exactly the part of a bill a commitment can cover with little risk. Paying list price for it month
after month is the cost this finding points at.

## Looking at 90 days of daily credits

```sql
SELECT usage_date,
       SUM(credits_billed) AS credits_billed
FROM SNOWFLAKE.ACCOUNT_USAGE.METERING_DAILY_HISTORY
WHERE usage_date >= DATEADD('day', -90, CURRENT_DATE())
GROUP BY usage_date
ORDER BY usage_date;
```

[METERING_DAILY_HISTORY](https://docs.snowflake.com/en/sql-reference/account-usage/metering_daily_history) reports credits per
service type per day, and `CREDITS_BILLED` sums compute, cloud services and the cloud services
adjustment. The lowest days in the series, rather than the average, are the safest guide to how
much usage is truly steady. The view can lag by up to 3 hours and needs the `USAGE_VIEWER` role.

## A baseline above 10 credits a day for 90 days

ZopNight derives a steady baseline of daily credits for the account and averages it over a 90-day
window. When that average is above 10 credits a day, the account is flagged. Ninety days is used so
that a single busy month, or a one-off backfill, cannot create the appearance of a floor.

## When it has nothing to say

The rule reads nothing but that baseline series. If ZopNight does not have it for the account,
or it has no datapoints across the window, no finding is raised. Today that is every account: the
baseline is collected without the account it belongs to, so it never reaches the rule, and no
finding is raised until that link is fixed. It also does not know your
contract terms, so an account already on Capacity through an organization-wide agreement can still
be flagged.

## Why no saving is calculated

The finding is advisory and carries no dollar figure. Capacity rates are set in your contract
with Snowflake, so ZopNight does not assume a discount. The size of
the opportunity is the baseline credits multiplied by the difference between your On Demand rate and
the Capacity rate you are offered.

## Moving the baseline onto a commitment

1. Pull 90 days or more of daily credits with the query above and note the minimum and a low
   percentile, not just the mean.
2. Remove workloads you already plan to shut down or move, so the commitment is not sized on usage
   that will disappear.
3. Take the steady figure to your Snowflake account team and ask for Capacity pricing sized to it,
   leaving bursts on the variable portion.
4. After signing, compare billed credits against the commitment each month so it neither lapses
   unused nor runs out early.
