CREATE BUDGET

Fully qualified name: SNOWFLAKE.CORE.BUDGET

Creates a new budget instance or replaces and existing budget instance in the current or specified schema.

See also:

ALTER BUDGET, SHOW BUDGET, DROP BUDGET

Syntax

CREATE [ OR REPLACE ] SNOWFLAKE.CORE.BUDGET [ IF NOT EXISTS ] <name> ()
  [ [ WITH ] COMMENT = '<string_literal>' ]
Copy

Parameters

name:

Specifies the identifier for the budget. The identifier must start with an alphabetic character and cannot contain spaces or special characters unless the identifier string is enclosed in double quotes (e.g. "My object"). Identifiers enclosed in double quotes are also case-sensitive.

For more details, refer to Identifier requirements.

Optional parameters

COMMENT = 'string_literal':

Specifies a comment for the budget.

Access control requirements

A role used to execute this SQL command must have the following privileges at a minimum:

Privilege / Role

Object

Notes

CREATE SNOWFLAKE.CORE.BUDGET

Schema

The role used to create a budget must be granted this privilege on the schema in which the budget is created.

SNOWFLAKE.BUDGET_CREATOR

Role

The role used to create a budget must be granted this database role.

The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema.

For more information, see Budgets roles and privileges.

Usage notes

  • To refer to this class by its unqualified name, include the database and schema of the class in your search path.

  • Replication isn’t supported for class instances except for instances of the CUSTOM_CLASSIFIER class.

  • An account can contain a maximum of 100 custom budgets.

Examples

Create budget my_budget in the current schema:

CREATE SNOWFLAKE.CORE.BUDGET my_budget();
Copy