DESCRIBE COMPUTE POOL¶
描述 计算池 的属性。
DESCRIBE 可以缩写为 DESC。
小技巧
除了 SQL,您还可以使用其他接口,如 Snowflake REST APIs、Snowflake Python APIs 和 Snowflake CLI。请参阅 备用接口。
语法¶
DESC[RIBE] COMPUTE POOL <name>
参数¶
name指定要描述的计算池的标识符。
如果标识符包含空格或特殊字符,则整个字符串必须放在双引号内。放在双引号内的标识符也区分大小写。
有关更多信息,请参阅 标识符要求。
输出¶
命令输出在以下列中提供计算池属性和元数据:
列 |
描述 |
|---|---|
|
计算池名称。 |
|
计算池的当前状态。 |
|
计算池的最小节点数。 |
|
计算池的最大节点数。 |
|
指定计算池中节点的机器类型。 |
|
计算池上运行的服务和作业数。 |
|
计算池上运行的作业数。 |
|
指定计算池自动挂起之前处于非活动状态的秒数。 |
|
指定是否在 Snowflake 尝试启动服务或作业时自动恢复计算池。 |
|
计算池中处于活动状态的节点数(一个或多个服务或作业在运行)。 |
|
计算池中处于空闲状态的节点数(没有任何服务或作业在运行)。 |
|
表示 Snowflake 为您的计算池定位的节点数。如果 以下示例说明了如何解释 示例 1: 假设在 CREATE COMPUTE POOL 命令中,您指定 MIN_NODES=1 且 MAX_NODES=3。 当 Snowflake 预置节点时, 在 Snowflake 预置一个节点后, 示例 2: 由于自动扩缩或最小节点数发生变化(通过 ALTER COMPUTE POOL ...SET MIN_NODES),Snowflake 可能会尝试向现有计算池添加节点。 当 Snowflake 预置节点时, 例如,假设 |
|
计算池的创建日期和时间。 |
|
暂停的计算池恢复的日期和时间。 |
|
使用 ALTER COMPUTE POOL 更新计算池的日期和时间。 |
|
拥有计算池的角色。 |
|
指定计算池的注释。 |
|
如果计算池是专门为 Snowflake Native App 而创建,则为 |
|
如果计算池是专门为应用程序创建的,则应填写Snowflake Native App 的名称。否则,显示 NULL。 |
|
监控计算池 Credit 使用量的 预算 名称。 |
|
错误代码(如果有)与 STATUS_MESSAGE 相关。否则,此字段为空。例如,当您调整计算池的大小时:
|
|
关于计算池状态的可选消息。例如:
|
访问控制要求¶
权限 |
对象 |
备注 |
|---|---|---|
MONITOR |
计算池 |
有关创建具有指定权限集的自定义角色的说明,请参阅 创建自定义角色。
使用说明¶
To post-process the output of this command, you can use the pipe operator (
->>) or the RESULT_SCAN function. Both constructs treat the output as a result set that you can query.The output column names for this command are generated in lowercase. If you consume a result set from this command with the pipe operator or the RESULT_SCAN function, use double-quoted identifiers for the column names in the query to ensure that they match the column names in the output that was scanned. For example, if the name of an output column is
type, then specify"type"for the identifier.
示例¶
以下示例描述了名为 tutorial_compute_pool 的计算池:
DESCRIBE COMPUTE POOL tutorial_compute_pool;
示例输出:
+-----------------------+--------+-----------+-----------+-----------------+--------------+----------+-------------------+-------------+--------------+------------+--------------+-------------------------------+-------------------------------+-------------------------------+-----------+---------+--------------+-------------+--------+------------+----------------+
| name | state | min_nodes | max_nodes | instance_family | num_services | num_jobs | auto_suspend_secs | auto_resume | active_nodes | idle_nodes | target_nodes | created_on | resumed_on | updated_on | owner | comment | is_exclusive | application | budget | error_code | status_message |
|-----------------------+--------+-----------+-----------+-----------------+--------------+----------+-------------------+-------------+--------------+------------+--------------+-------------------------------+-------------------------------+-------------------------------+-----------+---------+--------------+-------------+--------+------------+----------------|
| TUTORIAL_COMPUTE_POOL | ACTIVE | 1 | 1 | CPU_X64_XS | 3 | 0 | 3600 | true | 1 | 0 | 1 | 2024-02-24 20:41:31.978 -0800 | 2024-08-08 11:27:01.775 -0700 | 2024-08-18 13:29:08.124 -0700 | TEST_ROLE | NULL | false | NULL | NULL | | |
+-----------------------+--------+-----------+-----------+-----------------+--------------+----------+-------------------+-------------+--------------+------------+--------------+-------------------------------+-------------------------------+-------------------------------+-----------+---------+--------------+-------------+--------+------------+----------------+
备用接口¶
Snowflake REST APIs
提取计算池 端点
Snowflake Python APIs
Snowflake CLI