<budget_name>!GET_SPENDING_LIMIT

View the spending limit for a budget.

See also:

<budget_name>!SET_SPENDING_LIMIT

Syntax

<budget_name>!GET_SPENDING_LIMIT()
Copy

Returns

  • The number of credits set as the spending limit for the budget.

  • -1 if the spending limit is not set.

Access Control Requirements

  • The following minimum privileges and roles are required to view results for custom budgets:

    • A role with any instance role for the budget instance.

    • A role granted the USAGE privilege on the database and schema that contains the budget instance.

  • The following role is required to view results for the account budget:

Examples

View the spending limit for budget my_budget in schema budget_db.budget_schema:

CALL budget_db.budget_schema.my_budget!GET_SPENDING_LIMIT();
Copy

View the spending limit for the account budget:

CALL snowflake.local.account_root_budget!GET_SPENDING_LIMIT();
Copy