<budget_name>!SET_NOTIFICATION_THRESHOLD

Sets a notification threshold for a budget. Notifications are sent when Snowflake predicts that spending will exceed the threshold.

语法

<budget_name>!SET_NOTIFICATION_THRESHOLD( <threshold_percent> );

实参

threshold_percent

Percentage of the budget limit. Notifications are sent when Snowflake determines that spending will exceed this percentage of the budget limit.

Accepted values: 0 - 1000

返回

Returns a VARCHAR value that indicates whether or not the notification threshold was successfully added.

访问控制要求

自定义预算 调用此方法需要以下最低权限和角色:

  • ADMIN instance role for the budget instance.
  • 对包含预算实例的数据库和架构的 USAGE 权限。

The following role is required to call this method for the account budget:

For more information, see Budgets roles and privileges.

使用说明

Calling this method does not return the object. Because of this, you can’t use method chaining to call another method on the return value of this method. Instead, call each method in a separate SQL statement.

示例

The following example sets the notification threshold of the account budget to 10% of the budget limit:

CALL SNOWFLAKE.LOCAL.ACCOUNT_ROOT_BUDGET!SET_NOTIFICATION_THRESHOLD(10);