<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_percentPercentage 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 实例角色。
对包含预算实例的数据库和架构的 USAGE 权限。
The following role is required to call this method for the account budget:
账户预算的 BUDGET_ADMIN 应用程序角色。
有关更多信息,请参阅 Budgets 角色和权限。
使用说明¶
调用此方法不会返回对象。因此,您无法使用方法链来调用此方法返回值上的另一个方法。相反,应在单独 SQL 语句中调用每个方法。
示例¶
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);