DESCRIBE COMPUTE POOL

Describes the properties of a compute pool.

DESCRIBE can be abbreviated to DESC.

See also:

CREATE COMPUTE POOL , ALTER COMPUTE POOL, DROP COMPUTE POOL , SHOW COMPUTE POOLS

Syntax

DESC[RIBE] COMPUTE POOL <name>
Copy

Parameters

name

Specifies the identifier for the compute pool to describe.

If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

For more information, see Identifier requirements.

Output

The command output provides compute pool properties and metadata in the following columns:

Column

Description

name

Compute pool name.

state

Current state of the compute pool.

min_nodes

Minimum number of nodes in the compute pool.

max_nodes

Maximum number of nodes in the compute pool.

instance_family

Specifies the machine type of nodes in the compute pool.

num_services

The number of services and jobs running on the compute pool.

num_jobs

Number of jobs running on the compute pool.

auto_suspend_secs

Specifies the number of seconds of inactivity after which the compute pool is automatically suspended.

auto_resume

Specifies whether to automatically resume a compute pool when Snowflake attempts to start a service or job.

active_nodes

Number of nodes in the compute pool that are active (one or more services or jobs are running).

idle_nodes

Number of nodes in the compute pool that are idle (no service or job is running).

target_nodes

Indicates the number of nodes that Snowflake is targeting for your compute pool. If active_nodes is not equal to the target_nodes, then Snowflake will autoscale the cluster to add or remove the nodes.

The following examples demonstrate how to interpret the values in the target_nodes column.

Example 1: Suppose in a CREATE COMPUTE POOL command, you specify MIN_NODES=1 and MAX_NODES=3.

While Snowflake is provisioning a node, initially the value in the active_nodes and idle_nodes columns is 0, and the value in the target_nodes column is 1. (The value in the target_nodes column is the same as the value that you specified for the MIN_NODES parameter.) This indicates that there should be one node in the compute pool that Snowflake is provisioning.

After Snowflake provisions one node, the value in the idle_nodes column is 1 (assuming that there are no services running). The value in the target_nodes column is still 1, indicating there should be one node in the compute pool.

Example 2: Snowflake might try to add a node to an existing compute pool due to autoscaling or changes to the minimum number of nodes (through ALTER COMPUTE POOL … SET MIN_NODES).

While Snowflake is provisioning a node, the value in the state column is resizing. To determine how many nodes Snowflake is adding, check the value in the target_nodes column.

For example, suppose that the value in the, active_nodes column is 1, the value in the idle_nodes column is 0, and you resize the compute pool by updating the MIN_NODES property from 1 to 2. In this case, the value in the target_nodes column is 2 (the number of nodes that should be in the compute pool). From this, you can infer that Snowflake is provisioning one additional node.

created_on

Date and time when the compute pool was created.

resumed_on

Date and time when the suspended compute pool was resumed.

updated_on

Date and time when the compute pool was updated using ALTER COMPUTE POOL.

owner

Role that owns the compute pool.

comment

Specifies a comment for the compute pool.

is_exclusive

true if the compute pool is created exclusively for a Snowflake Native App; false otherwise.

application

Name of the Snowflake Native App if the compute pool is created exclusively for the app. Otherwise, NULL.

budget

The name of the budget monitoring the credit usage of the compute pool.

error_code

Error code, if any, relevant to the STATUS_MESSAGE. Otherwise, this field is empty. For example, when you resize a compute pool:

  • If Snowflake encounters a capacity error (new nodes can’t be provisioned), Snowflake returns the error code 392507.

    Note that the capacity error indicates the instance type you requested for your compute pool node is currently not available with the cloud provider. You can either wait for the capacity to become available or create a new compute pool with a different instance family.

  • If you have pending services (including job services) and Snowflake can’t scale up your compute pool, Snowflake returns the error code 392508.

status_message

Optional message about the status of the compute pool. For example:

  • After creating a compute pool, if you run the DESC COMPUTE POOL command, the output might include the status message: “Compute pool is starting for last 1 minute”.

  • If Snowflake encounters a capacity error when provisioning a node, the output might include the status message: “Compute pool is starting for the last 3 minutes. We have observed CAPACITY_ERROR.”

  • If you have pending services (including job services) and Snowflake can’t scale up your compute pool, the output might include the status message: “Compute pool has reached the maximum node limit. Consider increasing max_nodes using the ALTER COMPUTE POOL command.”

Access control requirements

A role used to execute this SQL command must have the following privileges at a minimum:

Privilege

Object

Notes

MONITOR

Compute pool

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Usage notes

  • To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.

Examples

The following example describes the compute pool named tutorial_compute_pool:

DESCRIBE COMPUTE POOL tutorial_compute_pool;
Copy

Sample output:

+-----------------------+--------+-----------+-----------+-----------------+--------------+----------+-------------------+-------------+--------------+------------+--------------+-------------------------------+-------------------------------+-------------------------------+-----------+---------+--------------+-------------+--------+------------+----------------+
| 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   |            |                |
+-----------------------+--------+-----------+-----------+-----------------+--------------+----------+-------------------+-------------+--------------+------------+--------------+-------------------------------+-------------------------------+-------------------------------+-----------+---------+--------------+-------------+--------+------------+----------------+