Overview
This command queries detailed information about all compute clusters in the current workspace.
Syntax
Parameters
-
LIKE PATTERN(optional): Filters by object name. SQL wildcards%and_can be used. For example,LIKE '%testing%'. Note that theLIKEclause cannot be used together with theWHEREclause. -
WHERE expr(optional): Filters compute clusters by specific attributes. The following attributes are supported:
vcluster_size: Compute cluster specification code, such asXSMALL,SMALL, etc., using uppercase letters.vcluster_type: Compute cluster type, such asANALYTICS,GENERAL, using uppercase letters.max_concurrency: Filter by concurrency level, enter a number.state: Compute cluster state, such asRESUMING,SUSPENDED, etc., using uppercase letters.creator: Username of the compute cluster creator, using lowercase letters.create_time: Creation time, format:"yyyy-MM-dd HH:mm:ss", stored as a string, supports comparison operators.min_replicas: Minimum number of compute instances, enter a number.max_replicas: Maximum number of compute instances, enter a number.preload_tables: List of table names in cache, stored as a string. You can use theLIKEclause to match specific table names.current_replicas: Current number of compute instances in the cluster, enter a number.auto_suspend_in_second: Number of seconds before the compute cluster auto-suspends, enter a number.
Examples
-
Query all compute clusters in the current workspace:
-
Query compute clusters whose names start with "CZ":
-
Use the WHERE clause to filter compute cluster result lists:
With the examples above, you can flexibly query and filter compute cluster information as needed. Ensure you use the correct case and operators in the WHERE clause to obtain accurate query results.
