<budget_name>!GET_NOTIFICATION_THRESHOLD

Returns the notification threshold for a budget. Notifications are sent when Snowflake predicts that spending will exceed the threshold, which is a percentage of the budget limit.

语法

<budget_name>!GET_NOTIFICATION_THRESHOLD();
Copy

返回

Returns a VARCHAR value containing the notification threshold percentage.

访问控制要求

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

  • 预算实例的任何 实例角色

  • 对包含预算实例的数据库和架构的 USAGE 权限。

账户预算 调用此方法需要以下最低权限和角色:

有关更多信息,请参阅 Budgets 角色和权限

使用说明

调用此方法不会返回对象。因此,您无法使用方法链来调用此方法返回值上的另一个方法。相反,应在单独 SQL 语句中调用每个方法。

示例

Get the notification threshold for budget my_budget in schema budget_db.budget_schema:

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

Get the notification threshold for the account budget:

CALL SNOWFLAKE.LOCAL.ACCOUNT_ROOT_BUDGET!GET_NOTIFICATION_THRESHOLD();
Copy
语言: 中文