Understand budget costs¶

Using budgets incurs the following costs:

  • Compute costs — Snowflake runs serverless background tasks (_MEASUREMENT_TASK and _BACKFILL_TASK) that collect credit usage data for the account budget and custom budgets in your account. The compute resources used for these tasks are billed to your account.

  • Storage costs — Snowflake stores metadata for Budgets in your account. Storage for this metadata is billed to your account.

Exploring compute costs¶

You can view costs for serverless tasks using Snowsight or the Account Usage SERVERLESS_TASK_HISTORY view. For more information, see the following topics:

The following example sums the credit usage for the measure task for the previous 28 days:

SELECT SUM(credits_used)
  FROM snowflake.account_usage.serverless_task_history
  WHERE task_name = '_MEASUREMENT_TASK'
    AND start_time >= DATEADD('day', -28, current_timestamp());
Copy

You can view costs for storage using Snowsight or by querying Account Usage and Organization Usage views. For more information about viewing storage costs, see Exploring storage cost.

Exploring storage costs¶

The data and metadata needed for budgets is stored in the following internal tables:

  • _CONFIGURATION_TABLE

  • _MEASUREMENT_TABLE

  • _NOTIFICATION_TABLE

  • _BUDGET_HOT_USAGE_DATA

  • _BUDGET_COLD_USAGE_DATA

To determine costs associated with these tables, you can query the TABLES view in the Account Usage or Organization Usage schema to return the amount of storage being used for the tables.

The following examples returns the sum of the storage being used for the internal tables associated with budgets in the current account:

SELECT SUM(bytes)
   FROM snowflake.account_usage.tables
   WHERE table_name IN (
      '_CONFIGURATION_TABLE',
      '_MEASUREMENT_TABLE',
      '_NOTIFICATION_TABLE',
      '_BUDGET_HOT_USAGE_DATA',
      '_BUDGET_COLD_USAGE_DATA');
Copy