@clickzetta/cz-cli-darwin-x64 0.3.87 → 0.3.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/bin/cz-cli +0 -0
  2. package/bin/skills/clickzetta-dynamic-table/SKILL.md +169 -169
  3. package/bin/skills/clickzetta-dynamic-table/best-practices/dimension-table-join-guide.md +126 -126
  4. package/bin/skills/clickzetta-dynamic-table/best-practices/medallion-and-stream-patterns.md +25 -25
  5. package/bin/skills/clickzetta-dynamic-table/best-practices/non-partitioned-merge-into-warning.md +48 -48
  6. package/bin/skills/clickzetta-dynamic-table/best-practices/performance-optimization.md +51 -51
  7. package/bin/skills/clickzetta-dynamic-table/best-practices/scheduling-guide.md +59 -59
  8. package/bin/skills/clickzetta-dynamic-table/dt-creator/SKILL.md +8 -7
  9. package/bin/skills/clickzetta-dynamic-table/dt-creator/references/dt-declaration-strategy.md +99 -99
  10. package/bin/skills/clickzetta-dynamic-table/dt-creator/references/incremental-config-reference.md +188 -188
  11. package/bin/skills/clickzetta-dynamic-table/dt-creator/references/refresh-history-guide.md +117 -117
  12. package/bin/skills/clickzetta-dynamic-table/dt-creator/references/sql-limitations.md +29 -29
  13. package/bin/skills/clickzetta-dynamic-table/dynamic-table-alter/SKILL.md +80 -79
  14. package/bin/skills/clickzetta-dynamic-table/sql-to-dt/SKILL.md +15 -15
  15. package/bin/skills/clickzetta-dynamic-table/sql-to-dt/references/sql2dt-column-validation-rules.md +61 -61
  16. package/bin/skills/clickzetta-dynamic-table/sql-to-dt/references/sql2dt-conversion-rules.md +100 -100
  17. package/bin/skills/clickzetta-dynamic-table/sql-to-dt/references/sql2dt-placeholder-rules.md +64 -64
  18. package/bin/skills/clickzetta-dynamic-table/sql-to-dt/references/sql2dt-refresh-rules.md +32 -32
  19. package/bin/skills/clickzetta-dynamic-table/sql-to-dt/references/sql2dt-self-reference-rules.md +21 -21
  20. package/bin/skills/clickzetta-dynamic-table/sql-to-dt/references/sql2dt-workflow.md +71 -71
  21. package/bin/skills/clickzetta-sql-pipeline-manager/SKILL.md +203 -202
  22. package/bin/skills/clickzetta-sql-pipeline-manager/references/dynamic-table.md +62 -62
  23. package/bin/skills/clickzetta-sql-pipeline-manager/references/materialized-view.md +34 -34
  24. package/bin/skills/clickzetta-sql-pipeline-manager/references/pipe.md +61 -61
  25. package/bin/skills/clickzetta-sql-pipeline-manager/references/table-stream.md +41 -41
  26. package/bin/skills/clickzetta-table-stream-pipeline/SKILL.md +103 -101
  27. package/bin/skills/cz-cli/SKILL.md +1 -1
  28. package/package.json +1 -1
@@ -1,58 +1,58 @@
1
- # Dynamic Table 增量刷新历史查询指南
1
+ # Dynamic Table Incremental Refresh History Query Guide
2
2
 
3
- 查看 DT/MV 的增量刷新历史有三种方式,适用于不同场景。
3
+ There are three ways to view the incremental refresh history of a DT/MV, each suited to different scenarios.
4
4
 
5
5
  ---
6
6
 
7
- ## 方式一:SHOW DYNAMIC TABLE REFRESH HISTORY
7
+ ## Method 1: SHOW DYNAMIC TABLE REFRESH HISTORY
8
8
 
9
- 查看 DT 的刷新作业级别信息,包括每次刷新的状态、耗时、触发方式、刷新模式等。
9
+ View job-level information for DT refreshes, including the status, duration, trigger type, and refresh mode of each refresh.
10
10
 
11
- ### 语法
11
+ ### Syntax
12
12
 
13
13
  ```sql
14
- -- 通过 WHERE 过滤(name 列匹配表名)
14
+ -- Filter by WHERE (name column matches table name)
15
15
  SHOW DYNAMIC TABLE REFRESH HISTORY WHERE name = 'my_dt';
16
16
 
17
- -- 组合 WHERE + LIMIT
17
+ -- Combine WHERE + LIMIT
18
18
  SHOW DYNAMIC TABLE REFRESH HISTORY WHERE name = 'my_dt' AND state = 'SUCCEED' LIMIT 20;
19
19
 
20
- -- MV 也支持同样的语法
20
+ -- MV supports the same syntax
21
21
  SHOW MATERIALIZED VIEW REFRESH HISTORY WHERE name = 'my_mv' LIMIT 10;
22
22
  ```
23
23
 
24
- ### 输出列
24
+ ### Output Columns
25
25
 
26
- | 列名 | 类型 | 说明 |
26
+ | Column | Type | Description |
27
27
  |------|------|------|
28
- | workspace_name | STRING | 所属 Workspace |
29
- | schema_name | STRING | 所属 Schema |
30
- | name | STRING | DT/MV 名称 |
31
- | virtual_cluster | STRING | 执行刷新的虚拟集群 |
32
- | start_time | TIMESTAMP | 刷新开始时间 |
33
- | end_time | TIMESTAMP | 刷新结束时间(运行中为 NULL |
34
- | duration | INTERVAL | 刷新耗时(运行中显示已经过的时间) |
35
- | state | STRING | 刷新状态(SUCCEED / FAILED / RUNNING 等) |
36
- | refresh_trigger | STRING | 触发方式:`SYSTEM_SCHEDULED`(系统调度自动触发)或 `MANUAL`(用户手动 REFRESH |
37
- | refresh_mode | STRING | 刷新模式,见下方详细说明 |
38
- | error_message | STRING | 失败时的错误信息(成功时为 NULL |
39
- | source_tables | ARRAY<MAP<STRING,STRING>> | 源表列表,每个元素是一个 MAP,包含 `workspace`、`schema`、`table_name` 三个 key |
40
- | stats | MAP<STRING,STRING> | 刷新统计,包含 `rows_inserted`(插入行数)和 `rows_deleted`(删除行数) |
41
- | job_id | STRING | 对应的 Job ID,可用于关联 `information_schema.job_history` 查更多详情 |
42
-
43
- ### refresh_mode 详解
44
-
45
- `refresh_mode` 是判断增量计算是否生效的关键字段:
46
-
47
- | | 含义 | 说明 |
28
+ | workspace_name | STRING | Workspace the DT/MV belongs to |
29
+ | schema_name | STRING | Schema the DT/MV belongs to |
30
+ | name | STRING | DT/MV name |
31
+ | virtual_cluster | STRING | Virtual cluster that executed the refresh |
32
+ | start_time | TIMESTAMP | Refresh start time |
33
+ | end_time | TIMESTAMP | Refresh end time (NULL while running) |
34
+ | duration | INTERVAL | Refresh duration (shows elapsed time while running) |
35
+ | state | STRING | Refresh status (SUCCEED / FAILED / RUNNING, etc.) |
36
+ | refresh_trigger | STRING | Trigger type: `SYSTEM_SCHEDULED` (auto-triggered by system) or `MANUAL` (user manually triggered REFRESH) |
37
+ | refresh_mode | STRING | Refresh mode; see detailed description below |
38
+ | error_message | STRING | Error message on failure (NULL on success) |
39
+ | source_tables | ARRAY<MAP<STRING,STRING>> | Source table list; each element is a MAP with keys `workspace`, `schema`, `table_name` |
40
+ | stats | MAP<STRING,STRING> | Refresh statistics, including `rows_inserted` and `rows_deleted` |
41
+ | job_id | STRING | Corresponding Job ID; can be used to join `information_schema.job_history` for more details |
42
+
43
+ ### refresh_mode Details
44
+
45
+ `refresh_mode` is the key field for determining whether incremental computation is working:
46
+
47
+ | Value | Meaning | Description |
48
48
  |----|------|------|
49
- | `INCREMENTAL` | 增量刷新 | 增量引擎成功生成了增量计划,只处理了源表的变更数据 |
50
- | `FULL` | 全量刷新 | 回退到全量重算。可能原因:首次刷新、维度表变更、增量计划生成失败、用户强制全量等 |
51
- | `NO_DATA` | 无数据变更 | 源表在上次刷新后没有新的数据变更,本次刷新跳过计算 |
49
+ | `INCREMENTAL` | Incremental refresh | The incremental engine successfully generated an incremental plan and only processed change data from source tables |
50
+ | `FULL` | Full refresh | Fell back to full recomputation. Possible reasons: first refresh, dimension table change, incremental plan generation failed, user forced full, etc. |
51
+ | `NO_DATA` | No data changes | No new data changes in source tables since the last refresh; this refresh skipped computation |
52
52
 
53
- ### source_tables 详解
53
+ ### source_tables Details
54
54
 
55
- `source_tables` 列返回该次刷新涉及的所有输入表信息,每个元素是一个 MAP
55
+ The `source_tables` column returns information about all input tables involved in this refresh; each element is a MAP:
56
56
 
57
57
  ```
58
58
  [
@@ -61,77 +61,77 @@ SHOW MATERIALIZED VIEW REFRESH HISTORY WHERE name = 'my_mv' LIMIT 10;
61
61
  ]
62
62
  ```
63
63
 
64
- ### stats 详解
64
+ ### stats Details
65
65
 
66
- `stats` 列返回该次刷新对目标表的写入统计:
66
+ The `stats` column returns write statistics for the target table from this refresh:
67
67
 
68
68
  ```
69
69
  {"rows_inserted": "1000", "rows_deleted": "50"}
70
70
  ```
71
71
 
72
- - `rows_inserted`:本次刷新向目标表插入的行数
73
- - `rows_deleted`:本次刷新从目标表删除的行数(增量模式下,更新操作会产生 delete + insert
72
+ - `rows_inserted`: number of rows inserted into the target table in this refresh
73
+ - `rows_deleted`: number of rows deleted from the target table in this refresh (in incremental mode, update operations produce delete + insert)
74
74
 
75
- ### 典型用法
75
+ ### Typical Usage
76
76
 
77
77
  ```sql
78
- -- 查看失败的刷新记录
78
+ -- View failed refresh records
79
79
  SHOW DYNAMIC TABLE REFRESH HISTORY WHERE name = 'my_dt' AND state = 'FAILED';
80
80
 
81
- -- 查看是否回退到了全量刷新(排查增量是否生效)
81
+ -- Check if it fell back to full refresh (troubleshoot whether incremental is working)
82
82
  SHOW DYNAMIC TABLE REFRESH HISTORY WHERE name = 'my_dt' AND refresh_mode = 'FULL';
83
83
 
84
- -- 查看无数据变更的刷新(源表没有新数据时会出现)
84
+ -- View no-data-change refreshes (appears when source table has no new data)
85
85
  SHOW DYNAMIC TABLE REFRESH HISTORY WHERE name = 'my_dt' AND refresh_mode = 'NO_DATA';
86
86
 
87
- -- 查看系统自动调度的刷新
87
+ -- View system auto-scheduled refreshes
88
88
  SHOW DYNAMIC TABLE REFRESH HISTORY WHERE name = 'my_dt' AND refresh_trigger = 'SYSTEM_SCHEDULED';
89
89
  ```
90
90
 
91
91
  ---
92
92
 
93
- ## 方式二:DESC HISTORY
93
+ ## Method 2: DESC HISTORY
94
94
 
95
- 查看表的版本级别历史,包括每个版本的行数、字节数、操作类型等。适用于了解数据变更粒度。
95
+ View version-level history of a table, including row count, bytes, and operation type for each version. Useful for understanding data change granularity.
96
96
 
97
- ### 语法
97
+ ### Syntax
98
98
 
99
99
  ```sql
100
- -- 查看 DT 的版本历史
100
+ -- View version history of a DT
101
101
  DESC HISTORY my_dt;
102
102
 
103
- -- 查看源表的版本历史
103
+ -- View version history of a source table
104
104
  DESC HISTORY source_table;
105
105
 
106
- -- 支持 WHERE 过滤
106
+ -- Supports WHERE filtering
107
107
  DESC HISTORY my_dt WHERE version > 10;
108
108
 
109
- -- 支持 LIMIT
109
+ -- Supports LIMIT
110
110
  DESC HISTORY my_dt LIMIT 20;
111
111
  ```
112
112
 
113
- ### 输出列
113
+ ### Output Columns
114
114
 
115
- 对于普通表(DESC_TABLE_HISTORY):
115
+ For regular tables (DESC_TABLE_HISTORY):
116
116
 
117
- | 列名 | 类型 | 说明 |
117
+ | Column | Type | Description |
118
118
  |------|------|------|
119
- | sequence | BIGINT | 序列号 |
120
- | version | BIGINT | 版本号 |
121
- | time | TIMESTAMP | 版本创建时间 |
122
- | total_rows | BIGINT | 该版本的总行数 |
123
- | total_bytes | BIGINT | 该版本的总字节数 |
124
- | user | STRING | 操作用户 |
125
- | operation | STRING | 操作类型(INSERT / COMPACTION / REFRESH 等) |
126
- | job_id | STRING | 对应的 Job ID |
127
-
128
- 对于 DT/MVDESC_MV_HISTORY),额外包含:
129
-
130
- | 列名 | 类型 | 说明 |
119
+ | sequence | BIGINT | Sequence number |
120
+ | version | BIGINT | Version number |
121
+ | time | TIMESTAMP | Version creation time |
122
+ | total_rows | BIGINT | Total row count for this version |
123
+ | total_bytes | BIGINT | Total bytes for this version |
124
+ | user | STRING | User who performed the operation |
125
+ | operation | STRING | Operation type (INSERT / COMPACTION / REFRESH, etc.) |
126
+ | job_id | STRING | Corresponding Job ID |
127
+
128
+ For DT/MV (DESC_MV_HISTORY), additionally includes:
129
+
130
+ | Column | Type | Description |
131
131
  |------|------|------|
132
- | source_tables | ARRAY<MAP<STRING,STRING>> | 源表及其对应的版本信息 |
132
+ | source_tables | ARRAY<MAP<STRING,STRING>> | Source tables and their corresponding version information |
133
133
 
134
- DESC HISTORY DT/MV `source_tables` SHOW REFRESH HISTORY 更详细,包含每个源表在该版本对应的快照信息:
134
+ DESC HISTORY's `source_tables` for DT/MV is more detailed than SHOW REFRESH HISTORY, including snapshot information for each source table at that version:
135
135
 
136
136
  ```
137
137
  [
@@ -140,75 +140,75 @@ DESC HISTORY 对 DT/MV 的 `source_tables` 比 SHOW REFRESH HISTORY 更详细,
140
140
  ]
141
141
  ```
142
142
 
143
- - `version`:源表的 snapshot_id
144
- - `sequence`:源表的 sequence
145
- - `commit_time`:源表该版本的提交时间
143
+ - `version`: snapshot_id of the source table
144
+ - `sequence`: sequence number of the source table
145
+ - `commit_time`: commit time of that version of the source table
146
146
 
147
- 这些信息可以用来追溯某次刷新读取了源表的哪个版本数据。
147
+ This information can be used to trace which version of source table data was read in a given refresh.
148
148
 
149
- ### 典型用法
149
+ ### Typical Usage
150
150
 
151
151
  ```sql
152
- -- 查看 DT 最近的版本变化,确认 compaction 是否正常执行
152
+ -- View recent version changes of a DT; confirm compaction is executing normally
153
153
  DESC HISTORY my_dt LIMIT 10;
154
154
 
155
- -- 查看源表的版本历史,判断数据写入频率
155
+ -- View version history of a source table; determine data write frequency
156
156
  DESC HISTORY source_table LIMIT 20;
157
157
 
158
- -- 查看 DT compaction 记录
158
+ -- View compaction records of a DT
159
159
  DESC HISTORY my_dt WHERE operation = 'COMPACTION';
160
160
  ```
161
161
 
162
162
  ---
163
163
 
164
- ## 方式三:information_schema.materialized_view_refresh_history
164
+ ## Method 3: information_schema.materialized_view_refresh_history
165
165
 
166
- information_schema 查询刷新历史,适合跨表批量分析、与其他系统集成、或做长期趋势监控。数据按天分区(pt_date),保留天数由系统配置决定。
166
+ Query refresh history from information_schema; suitable for cross-table batch analysis, integration with other systems, or long-term trend monitoring. Data is partitioned by day (pt_date); retention days are determined by system configuration.
167
167
 
168
- ### 语法
168
+ ### Syntax
169
169
 
170
170
  ```sql
171
- -- 查看指定 DT 的刷新历史
171
+ -- View refresh history for a specific DT
172
172
  SELECT *
173
173
  FROM information_schema.materialized_view_refresh_history
174
174
  WHERE materialized_view_name = 'my_dt'
175
175
  ORDER BY start_time DESC
176
176
  LIMIT 10;
177
177
 
178
- -- 查看某天所有 DT 的刷新情况
178
+ -- View refresh status of all DTs on a given day
179
179
  SELECT materialized_view_name, status, start_time, end_time, error_message
180
180
  FROM information_schema.materialized_view_refresh_history
181
181
  WHERE pt_date = '2025-01-15'
182
182
  ORDER BY start_time DESC;
183
183
 
184
- -- 查看失败的刷新
184
+ -- View failed refreshes
185
185
  SELECT materialized_view_name, error_code, error_message, start_time
186
186
  FROM information_schema.materialized_view_refresh_history
187
187
  WHERE status = 'FAILED' AND pt_date >= '2025-01-01'
188
188
  ORDER BY start_time DESC;
189
189
  ```
190
190
 
191
- ### 输出列
191
+ ### Output Columns
192
192
 
193
- | 列名 | 类型 | 说明 |
193
+ | Column | Type | Description |
194
194
  |------|------|------|
195
- | workspace_name | STRING | 所属 Workspace |
196
- | schema_name | STRING | 所属 Schema |
197
- | materialized_view_name | STRING | DT/MV 名称 |
198
- | cru | DOUBLE | 消耗的计算资源单位 |
199
- | virtual_cluster_name | STRING | 执行刷新的虚拟集群 |
200
- | status | STRING | 刷新状态 |
201
- | scheduled_start_time | TIMESTAMP | 计划开始时间 |
202
- | start_time | TIMESTAMP | 实际开始时间 |
203
- | end_time | TIMESTAMP | 结束时间 |
204
- | error_code | STRING | 错误码 |
205
- | error_message | STRING | 错误信息 |
206
- | pt_date | STRING | 分区日期 |
207
-
208
- ### 典型用法
195
+ | workspace_name | STRING | Workspace the DT/MV belongs to |
196
+ | schema_name | STRING | Schema the DT/MV belongs to |
197
+ | materialized_view_name | STRING | DT/MV name |
198
+ | cru | DOUBLE | Compute resource units consumed |
199
+ | virtual_cluster_name | STRING | Virtual cluster that executed the refresh |
200
+ | status | STRING | Refresh status |
201
+ | scheduled_start_time | TIMESTAMP | Scheduled start time |
202
+ | start_time | TIMESTAMP | Actual start time |
203
+ | end_time | TIMESTAMP | End time |
204
+ | error_code | STRING | Error code |
205
+ | error_message | STRING | Error message |
206
+ | pt_date | STRING | Partition date |
207
+
208
+ ### Typical Usage
209
209
 
210
210
  ```sql
211
- -- 统计某个 DT 最近 7 天的刷新成功率
211
+ -- Calculate the refresh success rate of a DT over the last 7 days
212
212
  SELECT
213
213
  pt_date,
214
214
  COUNT(*) AS total,
@@ -220,7 +220,7 @@ WHERE materialized_view_name = 'my_dt'
220
220
  GROUP BY pt_date
221
221
  ORDER BY pt_date;
222
222
 
223
- -- 查看消耗 CRU 最多的刷新
223
+ -- View refreshes that consumed the most CRU
224
224
  SELECT materialized_view_name, cru, start_time, end_time
225
225
  FROM information_schema.materialized_view_refresh_history
226
226
  WHERE pt_date >= '2025-01-01'
@@ -228,33 +228,33 @@ ORDER BY cru DESC
228
228
  LIMIT 10;
229
229
  ```
230
230
 
231
- ### information_schema.job_history 的区别
231
+ ### Difference from information_schema.job_history
232
232
 
233
- `information_schema.job_history` 记录所有类型的 Job(SQL 查询、DMLDDL 等),而 `materialized_view_refresh_history` 专门记录 DT/MV 的刷新历史,字段更有针对性。
233
+ `information_schema.job_history` records all types of Jobs (SQL queries, DML, DDL, etc.), while `materialized_view_refresh_history` specifically records DT/MV refresh history with more targeted fields.
234
234
 
235
- 如果需要查看刷新 Job 的完整信息(如 job_textinput_bytes 等),可以通过 job_id 关联:
235
+ If you need to view complete information about a refresh Job (e.g., job_text, input_bytes, etc.), you can join via job_id:
236
236
 
237
237
  ```sql
238
- -- 通过 SHOW DYNAMIC TABLE REFRESH HISTORY 获取 job_id,再到 job_history 查详情
238
+ -- Get job_id from SHOW DYNAMIC TABLE REFRESH HISTORY, then look up details in job_history
239
239
  SELECT *
240
240
  FROM information_schema.job_history
241
- WHERE job_id = '<从 SHOW REFRESH HISTORY 获取的 job_id>'
241
+ WHERE job_id = '<job_id from SHOW REFRESH HISTORY>'
242
242
  AND pt_date = '2025-01-15';
243
243
  ```
244
244
 
245
245
  ---
246
246
 
247
- ## 三种方式对比
247
+ ## Comparison of Three Methods
248
248
 
249
- | 特性 | SHOW REFRESH HISTORY | DESC HISTORY | information_schema |
249
+ | Feature | SHOW REFRESH HISTORY | DESC HISTORY | information_schema |
250
250
  |------|---------------------|--------------|-------------------|
251
- | 粒度 | 刷新作业级别 | 表版本级别 | 刷新作业级别 |
252
- | 刷新模式(增量/全量/无数据) | ✅ refresh_mode | ❌ | ❌ |
253
- | 触发方式(调度/手动) | ✅ refresh_trigger | ❌ | ❌ |
254
- | 写入统计(inserted/deleted | ✅ stats | ❌ | ❌ |
255
- | 源表列表 | ✅ 表名级别 | ✅ 含版本/sequence/commit_time | ❌ |
256
- | 版本号/总行数/总字节数 | ❌ | ✅ version/total_rows/total_bytes | ❌ |
257
- | CRU 消耗 | ❌ | ❌ | ✅ cru |
258
- | 跨表批量查询 | ❌(单表) | ❌(单表) | ✅(可批量) |
259
- | compaction 记录 | ❌ | ✅ | ❌ |
260
- | 适用场景 | 排查增量是否生效、刷新状态 | 查看数据版本变化、追溯源表版本 | 批量分析/监控/CRU 统计 |
251
+ | Granularity | Refresh job level | Table version level | Refresh job level |
252
+ | Refresh mode (incremental/full/no data) | ✅ refresh_mode | ❌ | ❌ |
253
+ | Trigger type (scheduled/manual) | ✅ refresh_trigger | ❌ | ❌ |
254
+ | Write statistics (inserted/deleted) | ✅ stats | ❌ | ❌ |
255
+ | Source table list | ✅ table name level | ✅ includes version/sequence/commit_time | ❌ |
256
+ | Version number / total rows / total bytes | ❌ | ✅ version/total_rows/total_bytes | ❌ |
257
+ | CRU consumption | ❌ | ❌ | ✅ cru |
258
+ | Cross-table batch queries | (single table) | (single table) | (batch supported) |
259
+ | Compaction records | ❌ | ✅ | ❌ |
260
+ | Applicable scenarios | Troubleshoot whether incremental is working; refresh status | View data version changes; trace source table versions | Batch analysis / monitoring / CRU statistics |
@@ -1,39 +1,39 @@
1
- # Dynamic Table SQL 限制与支持矩阵
1
+ # Dynamic Table SQL Limitations and Support Matrix
2
2
 
3
- 本文档列出 Dynamic Table 增量计算支持和不支持的 SQL 模式。
3
+ This document lists the SQL patterns that Dynamic Table incremental computation supports and does not support.
4
4
 
5
- ## JOIN 类型支持
5
+ ## JOIN Type Support
6
6
 
7
- | JOIN 类型 | 增量支持 | 说明 |
7
+ | JOIN type | Incremental support | Notes |
8
8
  |-----------|---------|------|
9
- | INNER JOIN | ✅ | 完全支持 |
10
- | LEFT JOIN (LEFT OUTER) | ✅ | 完全支持 |
11
- | RIGHT JOIN (RIGHT OUTER) | ✅ | 完全支持 |
12
- | FULL OUTER JOIN | ✅ | 完全支持 |
13
- | LEFT SEMI JOIN | ✅ | 完全支持 |
14
- | LEFT ANTI JOIN | ✅ | 完全支持 |
9
+ | INNER JOIN | ✅ | Fully supported |
10
+ | LEFT JOIN (LEFT OUTER) | ✅ | Fully supported |
11
+ | RIGHT JOIN (RIGHT OUTER) | ✅ | Fully supported |
12
+ | FULL OUTER JOIN | ✅ | Fully supported |
13
+ | LEFT SEMI JOIN | ✅ | Fully supported |
14
+ | LEFT ANTI JOIN | ✅ | Fully supported |
15
15
 
16
- ## 聚合函数支持
16
+ ## Aggregate Function Support
17
17
 
18
- ### 支持增量计算的聚合函数
18
+ ### Aggregate functions that support incremental computation
19
19
 
20
20
  - `SUM`, `SUM0`, `COUNT`, `COUNT_IF`, `MIN`, `MAX`, `MIN_BY`, `MAX_BY`
21
21
  - `AVG`, `STDDEV_SAMP`, `STDDEV_POP`, `VAR_SAMP`, `VAR_POP`
22
22
  - `Percentile`, `Median`, `COUNT_DISTINCT`
23
23
  - `BIT_OR`, `BIT_AND`, `BIT_XOR`, `BOOL_OR`, `BOOL_AND`
24
- - `GROUP_BITMAP` 系列
24
+ - `GROUP_BITMAP` series
25
25
  - `COLLECT_SET`, `COLLECT_LIST`, `COLLECT_SET_ON_ARRAY`, `COLLECT_LIST_ON_ARRAY`
26
26
  - `MAP_AGG`, `WM_CONCAT`
27
27
 
28
- ### 结果不稳定的聚合函数(增量结果可能与全量不一致)
28
+ ### Aggregate functions with unstable results (incremental results may differ from full refresh)
29
29
 
30
30
  - `ANY_VALUE`, `FIRST_VALUE`, `LAST_VALUE`
31
31
  - `APPROX_COUNT_DISTINCT`, `APPROX_HISTOGRAM`, `APPROX_TOP_K`, `APPROX_PERCENTILE`
32
32
  - `JSON_MERGE_AGG`
33
33
 
34
- ## 窗口函数支持
34
+ ## Window Function Support
35
35
 
36
- ### 支持的窗口函数
36
+ ### Supported window functions
37
37
 
38
38
  - `ROW_NUMBER`, `RANK`, `DENSE_RANK`, `PERCENT_RANK`
39
39
  - `FIRST_VALUE`, `LAST_VALUE`, `NTH_VALUE`
@@ -43,19 +43,19 @@
43
43
 
44
44
  ## ORDER BY / LIMIT / OFFSET
45
45
 
46
- 支持 `ORDER BY`、`LIMIT`、`OFFSET` 语法。
46
+ `ORDER BY`, `LIMIT`, and `OFFSET` syntax are supported.
47
47
 
48
- ⚠️ 不建议在 DT 中使用全局 `ORDER BY`。全局排序在每次增量刷新时开销非常大,推荐将排序逻辑放在下游查询数据时执行,而非 ETL 建模阶段。
48
+ ⚠️ Global `ORDER BY` inside a DT is not recommended. Global sorting has very high overhead on every incremental refresh. It is recommended to apply sorting logic when querying data downstream, not during the ETL modeling stage.
49
49
 
50
- ## 非确定性函数
50
+ ## Non-deterministic Functions
51
51
 
52
- 非确定性函数(如 `NOW()`、`CURRENT_TIMESTAMP`、`CURRENT_DATE`、`random()` 等)在不参与计算逻辑时默认支持。具体来说,只要这些函数不出现在以下位置,就可以正常使用:
53
- - 窗口函数的 `PARTITION BY` key
52
+ Non-deterministic functions (such as `NOW()`, `CURRENT_TIMESTAMP`, `CURRENT_DATE`, `random()`, etc.) are supported by default when they do not participate in computation logic. Specifically, as long as these functions do not appear in the following positions, they can be used normally:
53
+ - `PARTITION BY` key of a window function
54
54
  - `JOIN` key
55
55
  - `GROUP BY` key
56
- - 其他函数的入参
56
+ - Input arguments of other functions
57
57
 
58
- 典型场景:在 SELECT 中直接输出数据处理时间,记录每条数据被 DT 刷新处理的时刻:
58
+ Typical use case: output the data processing time directly in SELECT, recording the moment each row was processed by the DT refresh:
59
59
 
60
60
  ```sql
61
61
  CREATE DYNAMIC TABLE order_with_process_time AS
@@ -63,18 +63,18 @@ SELECT
63
63
  id,
64
64
  amount,
65
65
  status,
66
- CURRENT_TIMESTAMP AS process_time -- 记录刷新时的处理时间,直接输出到目标表
66
+ CURRENT_TIMESTAMP AS process_time -- records the processing time at refresh; output directly to target table
67
67
  FROM orders
68
68
  WHERE status = 'completed';
69
69
  ```
70
70
 
71
- 时间函数会在每次 REFRESH 时被常量折叠为当次刷新的时间戳。
71
+ Time functions are constant-folded to the current refresh timestamp on each REFRESH.
72
72
 
73
73
  ## UDF / UDAF / UDTF
74
74
 
75
- 自定义函数需要在创建时声明为确定性函数(deterministic),才能在 DT 中使用增量计算。未声明确定性的自定义函数会导致增量计算被禁用。
75
+ Custom functions must be declared as deterministic at creation time to use incremental computation in a DT. Custom functions not declared as deterministic will cause incremental computation to be disabled.
76
76
 
77
- ## 源表类型限制
77
+ ## Source Table Type Limitations
78
78
 
79
- - **虚拟视图(VIEW)**:不能作为 DT 的输入表,会禁用增量计算
80
- - **外部表(External Table)**:不支持增量计算
79
+ - **Virtual views (VIEW)**: cannot be used as input tables for a DT; will disable incremental computation
80
+ - **External tables (External Table)**: incremental computation is not supported