Skip to content

Commit 3eaa9e3

Browse files
authored
docs: add unassign warehouse nodes sql reference (#3164)
1 parent 43537c0 commit 3eaa9e3

4 files changed

Lines changed: 80 additions & 0 deletions

File tree

docs/cn/sql-reference/10-sql-commands/00-ddl/19-warehouse/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Databend Cloud 计算集群相关的 SQL 命令。
2121
| [USE WAREHOUSE](use-warehouse.md) | 切换当前会话的计算集群 |
2222
| [SHOW WAREHOUSES](show-warehouses.md) | 查看计算集群列表 |
2323
| [ALTER WAREHOUSE ... ASSIGN NODES](assign-warehouse-nodes.md) | 为计算集群中的 cluster 分配节点 |
24+
| [ALTER WAREHOUSE ... UNASSIGN NODES](unassign-warehouse-nodes.md) | 从计算集群的 cluster 中移除已分配节点 |
2425
| [ALTER WAREHOUSE](alter-warehouse.md) | 暂停、恢复或修改计算集群配置 |
2526
| [DROP WAREHOUSE](drop-warehouse.md) | 删除计算集群 |
2627
| [REPLACE WAREHOUSE](replace-warehouse.md) | 重建计算集群 |
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: ALTER WAREHOUSE UNASSIGN NODES
3+
sidebar_position: 7
4+
---
5+
6+
从某个计算集群中的一个或多个 cluster 移除已分配节点。
7+
8+
:::note
9+
此命令依赖 system management 功能,并需要企业版许可证。
10+
:::
11+
12+
## 语法
13+
14+
```sql
15+
ALTER WAREHOUSE <warehouse_name> UNASSIGN NODES
16+
(
17+
UNASSIGN <node_count> NODES [ FROM '<node_group>' ] FOR <cluster_name>
18+
[ , UNASSIGN <node_count> NODES [ FROM '<node_group>' ] FOR <cluster_name> , ... ]
19+
)
20+
```
21+
22+
## 参数
23+
24+
| 参数 | 说明 |
25+
|-----------|-------------|
26+
| `<warehouse_name>` | 目标计算集群。 |
27+
| `<node_count>` | 要移除的节点数量。 |
28+
| `FROM '<node_group>'` | 可选的节点组选择器。 |
29+
| `<cluster_name>` | 计算集群内部的目标 cluster。 |
30+
31+
## 示例
32+
33+
```sql
34+
ALTER WAREHOUSE etl_wh UNASSIGN NODES
35+
(
36+
UNASSIGN 1 NODES FOR c1,
37+
UNASSIGN 1 NODES FROM 'default' FOR c2
38+
);
39+
```

docs/en/sql-reference/10-sql-commands/00-ddl/19-warehouse/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Tags are returned in API responses and visible through `SHOW WAREHOUSES`.
5656
| [USE WAREHOUSE](use-warehouse.md) | Sets the current warehouse for the session |
5757
| [SHOW WAREHOUSES](show-warehouses.md) | Lists all warehouses with optional filtering |
5858
| [ALTER WAREHOUSE ... ASSIGN NODES](assign-warehouse-nodes.md) | Assigns nodes to warehouse clusters |
59+
| [ALTER WAREHOUSE ... UNASSIGN NODES](unassign-warehouse-nodes.md) | Removes assigned nodes from warehouse clusters |
5960
| [ALTER WAREHOUSE](alter-warehouse.md) | Suspends, resumes, or modifies warehouse settings |
6061
| [DROP WAREHOUSE](drop-warehouse.md) | Removes a warehouse |
6162
| [QUERY_HISTORY](query-history.md) | Inspects query logs for a warehouse |
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: ALTER WAREHOUSE UNASSIGN NODES
3+
sidebar_position: 7
4+
---
5+
6+
Removes assigned nodes from one or more clusters in a warehouse.
7+
8+
:::note
9+
This command requires system management support and an enterprise license.
10+
:::
11+
12+
## Syntax
13+
14+
```sql
15+
ALTER WAREHOUSE <warehouse_name> UNASSIGN NODES
16+
(
17+
UNASSIGN <node_count> NODES [ FROM '<node_group>' ] FOR <cluster_name>
18+
[ , UNASSIGN <node_count> NODES [ FROM '<node_group>' ] FOR <cluster_name> , ... ]
19+
)
20+
```
21+
22+
## Parameters
23+
24+
| Parameter | Description |
25+
|-----------|-------------|
26+
| `<warehouse_name>` | The target warehouse. |
27+
| `<node_count>` | Number of nodes to remove. |
28+
| `FROM '<node_group>'` | Optional node group selector. |
29+
| `<cluster_name>` | The target cluster inside the warehouse. |
30+
31+
## Example
32+
33+
```sql
34+
ALTER WAREHOUSE etl_wh UNASSIGN NODES
35+
(
36+
UNASSIGN 1 NODES FOR c1,
37+
UNASSIGN 1 NODES FROM 'default' FOR c2
38+
);
39+
```

0 commit comments

Comments
 (0)