SHOW WAREHOUSES¶
Lists all the warehouses in your account for which you have access privileges.
- See also:
ALTER WAREHOUSE , CREATE WAREHOUSE , DESCRIBE WAREHOUSE , DROP WAREHOUSE
Syntax¶
SHOW WAREHOUSES
[ LIKE '<pattern>' ]
[ WITH PRIVILEGES <objectPrivilege> [ , <objectPrivilege> [ , ... ] ] ]
Parameters¶
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 all 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 Enforcement model with primary role and secondary roles.
Usage notes¶
Columns that start with the prefix
is_
return eitherY
(yes) orN
(no).The command does not require a running warehouse to execute.
The command returns a maximum of 10K records for the specified object type, as dictated by the access privileges for the role used to execute the command; any records above the 10K limit are not returned, even with a filter applied.
To view results for which more than 10K records exist, query the corresponding view (if one exists) in the Snowflake Information Schema.
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.
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 of the warehouse |
|
Whether the warehouse is active/running ( |
|
Warehouse type; STANDARD and SNOWPARK-OPTIMIZED are the only currently supported types. |
|
Size of the warehouse (X-Small, Small, Medium, Large, X-Large, etc.) |
|
Minimum number of clusters for the (multi-cluster) warehouse (always 1 for single-cluster warehouses). |
|
Maximum number of clusters for the (multi-cluster) warehouse (always 1 for single-cluster warehouses). |
|
Number of clusters currently started. |
|
Number of SQL statements that are being executed by the warehouse. |
|
Number of SQL statements that are queued for the warehouse. |
|
Whether the warehouse is the default for the current user. |
|
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. |
|
Period of inactivity, in seconds, after which a running warehouse will automatically suspend and stop using credits; a |
|
Whether the warehouse, if suspended, automatically resumes when a query is submitted to the warehouse. |
|
Percentage of the warehouse compute resources that are provisioned and available. |
|
Percentage of the warehouse compute resources that are in the process of provisioning. |
|
Percentage of the warehouse compute resources that are executing SQL statements, but will be shut down once the queries complete. |
|
Percentage of the warehouse compute resources that are in a state other than |
|
Date and time when the warehouse was created. |
|
Date and time when the warehouse was last started or restarted. |
|
Date and time when the warehouse was last updated, which includes changing any of the properties of the warehouse or changing the state ( |
|
Role that owns the warehouse. |
|
Comment for the warehouse. |
|
Whether the query acceleration service is enabled for the warehouse. |
|
Maximum scale factor for the query acceleration service. |
|
ID of resource monitor explicitly assigned to the warehouse; controls the monthly credit usage for the warehouse. |
|
These five columns are for internal use and will be removed in a future release. |
|
Policy that determines when additional clusters (in a multi-cluster warehouse) are automatically started and shut down. |
|
Name of the budget if the object is monitored by a budget. NULL otherwise. |
|
The type of role that owns the object, for example |
For more information about the properties that can be specified for a warehouse, see CREATE WAREHOUSE.
Examples¶
Show warehouses with names that start with test
that you have privileges to view:
SHOW WAREHOUSES LIKE 'test%';
+---------------+-----------+--------------------+---------+-------------------+-------------------+------------------+---------+--------+------------+------------+--------------+-------------+-----------+--------------+-----------+-------+-------------------------------+-------------------------------+-------------------------------+--------------+---------+---------------------------+-------------------------------------+------------------+---------+----------+--------+-----------+----------+----------------+----------+-----------------+
| name | state | type | size | min_cluster_count | max_cluster_count | started_clusters | running | queued | is_default | is_current | auto_suspend | auto_resume | available | provisioning | quiescing | other | created_on | resumed_on | updated_on | owner | comment | enable_query_acceleration | query_acceleration_max_scale_factor | resource_monitor | actives | pendings | failed | suspended | uuid | scaling_policy | budget | owner_role_type |
|---------------+-----------+--------------------+---------+-------------------+-------------------+------------------+---------+--------+------------+------------+--------------+-------------+-----------+--------------+-----------+-------+-------------------------------+-------------------------------+-------------------------------+--------------+---------+---------------------------+-------------------------------------+------------------+---------+----------+--------+-----------+----------+----------------+----------|-----------------|
| TEST1 | SUSPENDED | STANDARD | Medium | 1 | 1 | 0 | 0 | 0 | N | N | 600 | true | | | | | 2023-01-27 14:57:07.768 -0800 | 2023-05-10 16:17:49.258 -0700 | 2023-05-10 16:17:49.258 -0700 | MY_ROLE | | true | 8 | null | 0 | 0 | 0 | 4 | 76064 | STANDARD | NULL | ROLE |
| TEST2 | SUSPENDED | STANDARD | X-Small | 1 | 1 | 0 | 0 | 0 | N | N | 600 | true | | | | | 2023-01-27 14:57:07.953 -0800 | 1969-12-31 16:00:00.000 -0800 | 2023-01-27 14:57:08.356 -0800 | MY_ROLE | | true | 16 | MYTEST_RM | 0 | 0 | 0 | 1 | 76116 | STANDARD | MYBUDGET | ROLE |
| TEST3 | SUSPENDED | STANDARD | Small | 1 | 1 | 0 | 0 | 0 | N | N | 600 | true | | | | | 2023-08-08 10:26:45.534 -0700 | 2023-08-08 10:26:45.681 -0700 | 2023-08-08 10:26:45.681 -0700 | MY_ROLE | | false | 8 | null | 0 | 0 | 0 | 2 | 19464517 | STANDARD | NULL | ROLE |
| TEST4 | RESUMING | SNOWPARK-OPTIMIZED | Large | 1 | 1 | 0 | 0 | 0 | N | Y | 600 | true | | | | | 2023-09-21 17:29:58.165 -0700 | 2023-09-21 17:29:58.165 -0700 | 2023-09-21 17:29:58.207 -0700 | MY_ROLE | | false | 8 | null | 0 | 0 | 0 | 0 | 19464585 | STANDARD | NULL | ROLE |
+---------------+-----------+--------------------+---------+-------------------+-------------------+------------------+---------+--------+------------+------------+--------------+-------------+-----------+--------------+-----------+-------+-------------------------------+-------------------------------+-------------------------------+--------------+---------+---------------------------+-------------------------------------+------------------+---------+----------+--------+-----------+----------+----------------+----------+-----------------+
Show warehouses that you have been granted the MODIFY and OPERATE privileges on:
SHOW WAREHOUSES WITH PRIVILEGES MODIFY, OPERATE;
+------------------------------+-----------+----------+---------+-------------------+-------------------+------------------+---------+--------+------------+------------+--------------+-------------+-----------+--------------+-----------+-------+-------------------------------+-------------------------------+-------------------------------+--------------+-------------------------------------------------+---------------------------+-------------------------------------+------------------+---------+----------+--------+-----------+----------+----------------+--------------------------+-----------------+
| name | state | type | size | min_cluster_count | max_cluster_count | started_clusters | running | queued | is_default | is_current | auto_suspend | auto_resume | available | provisioning | quiescing | other | created_on | resumed_on | updated_on | owner | comment | enable_query_acceleration | query_acceleration_max_scale_factor | resource_monitor | actives | pendings | failed | suspended | uuid | scaling_policy | budget | owner_role_type |
|------------------------------+-----------+----------+---------+-------------------+-------------------+------------------+---------+--------+------------+------------+--------------+-------------+-----------+--------------+-----------+-------+-------------------------------+-------------------------------+-------------------------------+--------------+-------------------------------------------------+---------------------------+-------------------------------------+------------------+---------+----------+--------+-----------+----------+----------------+--------------------------+-----------------|
| TEST_WH | SUSPENDED | STANDARD | X-Small | 1 | 1 | 0 | 0 | 0 | Y | Y | 600 | true | | | | | 2023-01-27 14:57:07.768 -0800 | 2024-07-30 13:39:24.118 -0700 | 2024-07-30 13:39:24.118 -0700 | TEST_ROLE | | true | 32 | TEST_RM | 0 | 0 | 0 | 1 | 76056 | STANDARD | KATS_RENAMED_TEST_BUDGET | ROLE |
| SNOWPARK_DEMO | SUSPENDED | STANDARD | X-Large | 1 | 1 | 0 | 0 | 0 | N | N | 600 | true | | | | | 2023-01-27 14:57:07.903 -0800 | 2023-04-10 11:47:03.146 -0700 | 2023-04-10 11:47:03.146 -0700 | ACCOUNTADMIN | Created by straut for Snowpark quickstart | false | 8 | null | 0 | 0 | 0 | 16 | 76104 | STANDARD | NULL | ROLE |
| TASTY_DEV_WH | SUSPENDED | STANDARD | X-Small | 1 | 1 | 0 | 0 | 0 | N | N | 60 | true | | | | | 2023-10-25 16:25:43.681 -0700 | 2023-10-25 16:25:43.681 -0700 | 2023-10-25 16:25:43.711 -0700 | SYSADMIN | developer warehouse for tasty bytes | false | 8 | null | 0 | 0 | 0 | 1 | 19464633 | STANDARD | NULL | ROLE |
| TB_DOCS_WH | SUSPENDED | STANDARD | X-Small | 1 | 1 | 0 | 0 | 0 | N | N | 60 | true | | | | | 2024-07-24 15:02:32.172 -0700 | 2024-07-24 15:33:30.502 -0700 | 2024-07-24 15:33:30.502 -0700 | SYSADMIN | developer warehouse for tasty bytes | false | 8 | null | 0 | 0 | 0 | 1 | 19465097 | STANDARD | NULL | ROLE |
+------------------------------+-----------+----------+---------+-------------------+-------------------+------------------+---------+--------+------------+------------+--------------+-------------+-----------+--------------+-----------+-------+-------------------------------+-------------------------------+-------------------------------+--------------+-------------------------------------------------+---------------------------+-------------------------------------+------------------+---------+----------+--------+-----------+----------+----------------+--------------------------+-----------------+