<budget_name>!GET_LINKED_RESOURCES

List the objects that we explicitly added to a custom budget.

The list does not include:

  • Objects that were added automatically (for example, compute pools and warehouses created and owned by a Snowflake Native App).
  • Objects that were added when a tag was added to the budget.

Important

This method is being deprecated. Use <budget_name>!GET_BUDGET_SCOPE instead.

语法

<budget_name>!GET_LINKED_RESOURCES()

返回

该函数返回以下列:

Column NameData TypeDescription
RESOURCE_IDNUMBERInternal identifier for the object.
NAMEVARCHARName of the object.
DOMAINVARCHAR

对象的域。有效值:

  • COMPUTE_POOL
  • DATABASE
  • MATERIALIZED_VIEW
  • PIPE
  • SCHEMA
  • TABLE
  • TASK
  • WAREHOUSE

Note

If the object is a Snowflake Native App, the value in this column is DATABASE (not APPLICATION).

SCHEMA_NAMEVARCHARName of the schema that contains the object. NULL if the object is not a schema-level object.
DATABASE_NAMEVARCHARName of the database that contains the object. NULL if the object is not a database-level or schema-level object.

访问控制要求

查看自定义预算的结果需要以下最低权限和角色:

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

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.

示例

Get all objects that were added to the budget_db.budget_schema.my_budget budget:

CALL budget_db.budget_schema.my_budget!GET_LINKED_RESOURCES();