SHOW WAREHOUSES
statementpartialAccounts, users, sessions, warehousesLists all the virtual warehouses in your account for which you have access privileges.
Syntax
supportedpartialnot supportednot scored
SHOW WAREHOUSES
[ LIKE '<pattern>' ]
[ WITH PRIVILEGES <objectPrivilege> [ , <objectPrivilege> [ , ... ] ] ]
Parameters
| Name | Required | Description |
|---|---|---|
LIKE 'pattern' | Optionally filters the command output by object name. The filter uses case-insensitive pattern matching, with support for SQL wildcard characters (% and _). For example, the following patterns return the same results: ... LIKE '%testing%' ... ... LIKE '%TESTING%' ... Default: No value (no filtering is applied to the output). | |
WITH PRIVILEGES object_privilege [ , object_privilege [ , ... ] ] | Optionally limits rows to objects for which the active role for the current user has been granted any of the specified privileges in the list on the object. If a CREATE <object> privilege is included in the privileges list, the command excludes objects for which secondary roles have been granted privileges. This is because only the primary role has the authorization to create objects. For more information, see Authorization through primary role and secondary roles. |
Usage notes
- The command doesn’t require a running warehouse to execute.
- The command only returns objects for which the current user’s current role has been granted at least one access privilege.
- The MANAGE GRANTS access privilege implicitly allows its holder to see every object in the account. By default, only the account administrator (users with the ACCOUNTADMIN role) and security administrator (users with the SECURITYADMIN role) have the MANAGE GRANTS privilege.
- 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. For example, you can use the pipe operator or RESULT_SCAN function to select specific columns from the SHOW command output or filter the rows. When you refer to the output columns, use double-quoted identifiers for the column names. For example, to select the output column type, specify SELECT "type". You must use double-quoted identifiers because the output column names for SHOW commands are in lowercase. The double quotes ensure that the column names in the SELECT list or WHERE clause match the column names in the SHOW command output that was scanned.
- The command returns a maximum of ten thousand records for the specified object type, as dictated by the access privileges for the role used to execute the command. Any records above the ten thousand records limit aren’t returned, even with a filter applied. To view results for which more than ten thousand records exist, query the corresponding view (if one exists) in the Snowflake Information Schema.
Output
The columns in the output provide the following information. For accounts that have the query acceleration service feature enabled, the output provides additional information. Column | Description name | Name of the warehouse. state | Whether the warehouse is: active/running (STARTED), inactive (SUSPENDED), or resizing (RESIZING). type | Warehouse type. One of STANDARD, SNOWPARK-OPTIMIZED, ADAPTIVE, or INTERACTIVE. size | Size of the warehouse (X-Small, Small, Medium, Large, X-Large, etc.) min_cluster_count | Minimum number of clusters for the (multi-cluster) warehouse (always 1 for single-cluster warehouses). max_cluster_count | Maximum number of clusters for the (multi-cluster) warehouse (always 1 for single-cluster warehouses). started_clusters | Number of clusters currently started. running | Number of SQL statements that are being executed by the warehouse. queued | Number of SQL statements that are queued for the warehouse. is_default | Whether the warehouse is the default for the current user. is_current | Whether the warehouse is in use for the session. Only one warehouse can be in use at a time for a session. To specify or change the warehouse for a session, use the USE WAREHOUSE command. auto_suspend | Period of inactivity, in seconds, after which a running warehouse will automatically suspend and stop using credits. A value of null indicates the warehouse never automatically suspends. auto_resume | Whether the warehouse, if suspended, automatically resumes when a query is submitted to the warehouse. available | Percentage of the warehouse compute resources that are provisioned and available. provisioning | Percentage of the warehouse compute resources that are in the process of provisioning. quiescing | Percentage of the warehouse compute resources that are executing SQL statements, but will be shut down once the queries complete. other | Percentage of the warehouse compute resources that are in a state other than available, provisioning, or quiescing. created_on | Date and time when the warehouse was created. resumed_on | Date and time when the warehouse was last started or restarted. updated_on | Date and time when the warehouse was last updated, which includes changing any of the properties of the warehouse or changing the state (STARTED, SUSPENDED, RESIZING) of the warehouse. owner | Role that owns the warehouse. comment | Comment for the warehouse. enable_query_acceleration | Whether the query acceleration service is enabled for the warehouse. query_acceleration_max_scale_factor | Maximum scale factor for the query acceleration service. resource_monitor | ID of resource monitor explicitly assigned to the warehouse; controls the monthly credit usage for the warehouse. actives , pendings , failed , suspended , uuid | These five columns are for internal use and will be removed in a future release. scaling_policy | Policy that determines when additional clusters (in a multi-cluster warehouse) are automatically started and shut down. owner_role_type | The type of role that owns the object, for example ROLE. If a Snowflake Native App owns the object, the value is APPLICATION. Snowflake returns NULL if you delete the object because a deleted object does not have an owner role. resource_constraint | If type is SNOWPARK-OPTIMIZED, one of: MEMORY_1X, MEMORY_1X_x86, MEMORY_16X, MEMORY_16X_x86, MEMORY_64X, MEMORY_64X_x86. Otherwise NULL. generation | The generation type of the warehouse. tables | For an interactive warehouse, a comma-separated list of the fully qualified names of the tables associated with the warehouse. NULL if no tables are associated or the warehouse isn’t an interactive warehouse. For more information about the properties that can be specified for a warehouse, see CREATE WAREHOUSE.
Known gaps
- WITH PRIVILEGES is not exercised by any test