@guandata/guanwf 0.1.832 → 0.1.833
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.
- package/CHANGELOG.md +6 -0
- package/README.md +5 -0
- package/binaries/guanwf-darwin-arm64 +0 -0
- package/binaries/guanwf-darwin-x64 +0 -0
- package/binaries/guanwf-linux-arm64 +0 -0
- package/binaries/guanwf-linux-x64 +0 -0
- package/binaries/guanwf-win32-x64.exe +0 -0
- package/package.json +1 -1
- package/skills/guanwf/references/ETL_AI_DEVELOP.md +52 -78
- package/skills/guanwf/references/WORKFLOW_DSL.md +2 -2
- package/skills/guanwf/references/WORKFLOW_NODES.md +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## @guandata/guanwf 0.1.833 - 2026-09-09
|
|
4
|
+
|
|
5
|
+
- DSL 新增节点类型、依赖类型和更新模式等类型化常量,同时保留已有字符串写法的兼容性。
|
|
6
|
+
- 改进工作流定义的序列化、导入与导出稳定性,减少往返编辑时的语义漂移。
|
|
7
|
+
- 统一错误分类和提示,自动化流程可更准确地区分输入、状态与后端失败。
|
|
8
|
+
|
|
3
9
|
## @guandata/guanwf 0.1.832 - 2026-09-03
|
|
4
10
|
|
|
5
11
|
- 同步底层 CLI 执行器解析更新,改善 Windows npm 全局安装和多种程序路径下的运行兼容性。
|
package/README.md
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -52,9 +52,9 @@ func DefineETL() []Node
|
|
|
52
52
|
|
|
53
53
|
```go
|
|
54
54
|
orders := BasicInputDataset("id_1001", "订单", "ds_orders", []Field{
|
|
55
|
-
BasicField("user_id",
|
|
56
|
-
BasicField("amount",
|
|
57
|
-
BasicField("order_date",
|
|
55
|
+
BasicField("user_id", FieldTypeSTRING),
|
|
56
|
+
BasicField("amount", FieldTypeDOUBLE),
|
|
57
|
+
BasicField("order_date", FieldTypeDATE),
|
|
58
58
|
}, Position{X: 100, Y: 100})
|
|
59
59
|
```
|
|
60
60
|
|
|
@@ -74,19 +74,19 @@ orders := BasicInputDataset("id_1001", "订单", "ds_orders", []Field{
|
|
|
74
74
|
calc := BasicCalculator("id_1002", "解析展示格式度量", inputA, []Formula{
|
|
75
75
|
{
|
|
76
76
|
Name: "下单转化率_数值",
|
|
77
|
-
Type:
|
|
77
|
+
Type: FieldTypeDOUBLE,
|
|
78
78
|
Expr: "CAST(REPLACE([下单转化率], \"%\", \"\") AS DOUBLE) / 100",
|
|
79
79
|
Key: "formula_order_rate_value",
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
Name: "营业时长_分钟",
|
|
83
|
-
Type:
|
|
83
|
+
Type: FieldTypeDOUBLE,
|
|
84
84
|
Expr: "CAST(IF(REGEXP_EXTRACT([营业时长], \"([0-9.]+)小时\", 1) = \"\", \"0\", REGEXP_EXTRACT([营业时长], \"([0-9.]+)小时\", 1)) AS DOUBLE) * 60 + CAST(IF(REGEXP_EXTRACT([营业时长], \"([0-9.]+)分\", 1) = \"\", \"0\", REGEXP_EXTRACT([营业时长], \"([0-9.]+)分\", 1)) AS DOUBLE)",
|
|
85
85
|
Key: "formula_open_minutes",
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
Name: "店铺分_数值",
|
|
89
|
-
Type:
|
|
89
|
+
Type: FieldTypeDOUBLE,
|
|
90
90
|
Expr: "CAST([店铺分] AS DOUBLE)",
|
|
91
91
|
Key: "formula_store_score_value",
|
|
92
92
|
},
|
|
@@ -122,7 +122,7 @@ BasicOutputDataset(id, name string, source Node, outputDsName string, position P
|
|
|
122
122
|
BasicOutputDatasetInDir(id, name string, source Node, outputDsName, parentDirId string, position Position)
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
`BasicOutputDatasetInDir`
|
|
125
|
+
**新建输出节点必须用 `BasicOutputDatasetInDir`** 并传入 `guanetl create --output-parent-dir` 确认过的 DATA_SET 目录 id;`save` 会拒绝没有目录的新输出(服务端对空目录不报错而是静默落到根目录,不符合目录管理规范)。无目录版本的 `BasicOutputDataset` 只用于 `edit` 回读已物化输出时的往返兼容(目录已固化在服务端 dataSource 中),不要在新增输出时使用。目录 ID 可通过 `guancli ds tree` 获取,不存在时用 `guanetl mkdir --type DATA_SET` 显式创建。
|
|
126
126
|
|
|
127
127
|
新建 ETL 时有两类目录 id,不能混用:
|
|
128
128
|
|
|
@@ -147,20 +147,20 @@ BasicSelectColumns(id, name string, source Node, columns []ColumnSetting, positi
|
|
|
147
147
|
### 筛选
|
|
148
148
|
|
|
149
149
|
```go
|
|
150
|
-
BasicFilterRows(id, name string, source Node, combineType
|
|
150
|
+
BasicFilterRows(id, name string, source Node, combineType CombineType, conditions []FilterCondition, position Position)
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
- `combineType`
|
|
154
|
-
-
|
|
153
|
+
- `combineType` 用常量 `CombineTypeAND` / `CombineTypeOR`
|
|
154
|
+
- 操作符用 `FilterOp*` 常量:`FilterOpEQ` `FilterOpNE` `FilterOpLT` `FilterOpLE` `FilterOpGT` `FilterOpGE` `FilterOpIN` `FilterOpBT` `FilterOpCONTAINS` `FilterOpNOTCONTAINS` `FilterOpSTARTSWITH` `FilterOpNOTSTARTSWITH` `FilterOpENDSWITH` `FilterOpNOTENDSWITH`
|
|
155
155
|
- 当前 `BasicFilterRows` 不支持 `IS_NULL` / `NOT_NULL`;null 过滤请改用 SQL 节点(如 ``WHERE `列名` IS NULL`` / ``IS NOT NULL``)。
|
|
156
156
|
|
|
157
157
|
### 等值 JOIN
|
|
158
158
|
|
|
159
159
|
```go
|
|
160
|
-
BasicJoinData(id, name string, leftSource, rightSource Node, joinType
|
|
160
|
+
BasicJoinData(id, name string, leftSource, rightSource Node, joinType JoinType, joinColumns []JoinColumnPair, outputColumns []JoinOutputColumn, position Position)
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
- `joinType`
|
|
163
|
+
- `joinType` 用常量 `JoinTypeINNER` `JoinTypeLEFTOUTER` `JoinTypeRIGHTOUTER` `JoinTypeFULLOUTER`
|
|
164
164
|
|
|
165
165
|
### 聚合
|
|
166
166
|
|
|
@@ -168,7 +168,7 @@ BasicJoinData(id, name string, leftSource, rightSource Node, joinType string, jo
|
|
|
168
168
|
BasicGroupBy(id, name string, source Node, groupByColumns []GroupByColumn, aggregationColumns []AggregationColumn, position Position)
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
-
|
|
171
|
+
- 聚合类型用常量 `AggrTypeSUM` `AggrTypeCOUNT` `AggrTypeCOUNTDISTINCT` `AggrTypeMIN` `AggrTypeMAX` `AggrTypeAVG` `AggrTypeFIRSTNOTNULL`
|
|
172
172
|
|
|
173
173
|
### 计算列
|
|
174
174
|
|
|
@@ -181,14 +181,14 @@ BasicCalculator(id, name string, source Node, formulas []Formula, position Posit
|
|
|
181
181
|
```go
|
|
182
182
|
Formula{
|
|
183
183
|
Name: "订单金额等级",
|
|
184
|
-
Type:
|
|
184
|
+
Type: FieldTypeSTRING,
|
|
185
185
|
Expr: "IF([金额] >= 1000, \"大额\", \"普通\")",
|
|
186
186
|
Key: "formula_amount_level",
|
|
187
187
|
}
|
|
188
188
|
```
|
|
189
189
|
|
|
190
190
|
- `Name` 是新增列名。
|
|
191
|
-
- `Type`
|
|
191
|
+
- `Type` 是新增列类型,用 `FieldType*` 常量:`FieldTypeINT` `FieldTypeDOUBLE` `FieldTypeSTRING` `FieldTypeTIMESTAMP` `FieldTypeLONG` `FieldTypeSHORT` `FieldTypeFLOAT` `FieldTypeDATE` `FieldTypeBOOL` `FieldTypeDECIMAL` `FieldTypeARRAY`。
|
|
192
192
|
- `Expr` 是服务端公式表达式,字段引用必须写成 `[字段名]`。
|
|
193
193
|
- `Key` 在同一个 `CALCULATOR` 节点内必须唯一;建议用稳定字符串,不要留空。
|
|
194
194
|
|
|
@@ -217,13 +217,13 @@ Formula{
|
|
|
217
217
|
calc := BasicCalculator("id_1002", "新增计算列", inputA, []Formula{
|
|
218
218
|
{
|
|
219
219
|
Name: "含税金额",
|
|
220
|
-
Type:
|
|
220
|
+
Type: FieldTypeDOUBLE,
|
|
221
221
|
Expr: "ROUND([金额] * 1.13, 2)",
|
|
222
222
|
Key: "formula_tax_amount",
|
|
223
223
|
},
|
|
224
224
|
{
|
|
225
225
|
Name: "门店前缀",
|
|
226
|
-
Type:
|
|
226
|
+
Type: FieldTypeSTRING,
|
|
227
227
|
Expr: "LEFT([门店ID], 2)",
|
|
228
228
|
Key: "formula_store_prefix",
|
|
229
229
|
},
|
|
@@ -264,14 +264,14 @@ import . "guanetl/internal/framework"
|
|
|
264
264
|
|
|
265
265
|
func DefineETL() []Node {
|
|
266
266
|
inputA := BasicInputDataset("id_1001", "输入A", "ds_a", []Field{
|
|
267
|
-
BasicField("id",
|
|
267
|
+
BasicField("id", FieldTypeSTRING),
|
|
268
268
|
}, Position{X: 100, Y: 100})
|
|
269
269
|
|
|
270
270
|
transformed := BasicFilterRows(
|
|
271
271
|
"id_1002",
|
|
272
272
|
"筛选A",
|
|
273
273
|
inputA,
|
|
274
|
-
|
|
274
|
+
CombineTypeAND,
|
|
275
275
|
[]FilterCondition{},
|
|
276
276
|
Position{X: 320, Y: 100},
|
|
277
277
|
)
|
|
@@ -292,9 +292,9 @@ import . "guanetl/internal/framework"
|
|
|
292
292
|
|
|
293
293
|
func DefineETL() []Node {
|
|
294
294
|
orders := BasicInputDataset("id_1001", "订单", "ds_orders", []Field{
|
|
295
|
-
BasicField("门店",
|
|
296
|
-
BasicField("订单号",
|
|
297
|
-
BasicField("销售额",
|
|
295
|
+
BasicField("门店", FieldTypeSTRING),
|
|
296
|
+
BasicField("订单号", FieldTypeSTRING),
|
|
297
|
+
BasicField("销售额", FieldTypeDOUBLE),
|
|
298
298
|
}, Position{X: 100, Y: 120})
|
|
299
299
|
|
|
300
300
|
detail := BasicSelectColumns("id_1002", "订单明细", orders, []ColumnSetting{
|
|
@@ -308,10 +308,10 @@ func DefineETL() []Node {
|
|
|
308
308
|
"门店汇总",
|
|
309
309
|
orders,
|
|
310
310
|
[]GroupByColumn{
|
|
311
|
-
BasicGroupByColumn("门店",
|
|
311
|
+
BasicGroupByColumn("门店", FieldTypeSTRING),
|
|
312
312
|
},
|
|
313
313
|
[]AggregationColumn{
|
|
314
|
-
BasicAggregationColumnWithAlias("销售额",
|
|
314
|
+
BasicAggregationColumnWithAlias("销售额", FieldTypeDOUBLE, AggrTypeSUM, "销售额合计"),
|
|
315
315
|
},
|
|
316
316
|
Position{X: 340, Y: 200},
|
|
317
317
|
)
|
|
@@ -378,12 +378,12 @@ BasicInputDataset(id, name, inputDsID string, fields []Field, position Position)
|
|
|
378
378
|
BasicOutputDataset(id, name string, source Node, outputDsName string, position Position)
|
|
379
379
|
BasicOutputDatasetInDir(id, name string, source Node, outputDsName, parentDirId string, position Position)
|
|
380
380
|
BasicSelectColumns(id, name string, source Node, columns []ColumnSetting, position Position)
|
|
381
|
-
BasicFilterRows(id, name string, source Node, combineType
|
|
382
|
-
BasicJoinData(id, name string, leftSource, rightSource Node, joinType
|
|
381
|
+
BasicFilterRows(id, name string, source Node, combineType CombineType, conditions []FilterCondition, position Position)
|
|
382
|
+
BasicJoinData(id, name string, leftSource, rightSource Node, joinType JoinType, joinColumns []JoinColumnPair, outputColumns []JoinOutputColumn, position Position)
|
|
383
383
|
BasicGroupBy(id, name string, source Node, groupByColumns []GroupByColumn, aggregationColumns []AggregationColumn, position Position)
|
|
384
384
|
BasicCalculator(id, name string, source Node, formulas []Formula, position Position)
|
|
385
385
|
BasicRemoveDuplicates(id, name string, source Node, columnNames []string, position Position)
|
|
386
|
-
BasicAppendRows(id, name string, sources []Node, unionType
|
|
386
|
+
BasicAppendRows(id, name string, sources []Node, unionType UnionType, schemaSource string, position Position)
|
|
387
387
|
BasicSqlScript(id, name string, sources []Node, sql string, position Position)
|
|
388
388
|
```
|
|
389
389
|
|
|
@@ -407,18 +407,18 @@ NewSqlScript(id, name string, sources []Node, config SqlScriptConfig)
|
|
|
407
407
|
### 高频辅助函数
|
|
408
408
|
|
|
409
409
|
```go
|
|
410
|
-
BasicField(name, fieldType
|
|
410
|
+
BasicField(name string, fieldType FieldType)
|
|
411
411
|
BasicColumnSetting(name string)
|
|
412
412
|
BasicJoinColumnPair(leftColumn, rightColumn string)
|
|
413
413
|
BasicJoinOutputFromLeft(columnName string)
|
|
414
414
|
BasicJoinOutputFromRight(columnName string)
|
|
415
415
|
BasicJoinOutputFromLeftWithAlias(columnName, alias string)
|
|
416
416
|
BasicJoinOutputFromRightWithAlias(columnName, alias string)
|
|
417
|
-
BasicGroupByColumn(name, columnType
|
|
418
|
-
BasicGroupByColumnWithAlias(name, columnType, newName string)
|
|
419
|
-
BasicAggregationColumn(name, columnType, aggregationType
|
|
420
|
-
BasicAggregationColumnWithAlias(name, columnType, aggregationType, newName string)
|
|
421
|
-
BasicFilterCondition(columnName, operator
|
|
417
|
+
BasicGroupByColumn(name string, columnType FieldType)
|
|
418
|
+
BasicGroupByColumnWithAlias(name string, columnType FieldType, newName string)
|
|
419
|
+
BasicAggregationColumn(name string, columnType FieldType, aggregationType AggregationType)
|
|
420
|
+
BasicAggregationColumnWithAlias(name string, columnType FieldType, aggregationType AggregationType, newName string)
|
|
421
|
+
BasicFilterCondition(columnName string, operator FilterOperator, filterValues []FilterValue)
|
|
422
422
|
BasicFilterValue(value string)
|
|
423
423
|
BasicFilterColumnValue(columnName string)
|
|
424
424
|
ReadSQLFile(filename string)
|
|
@@ -428,55 +428,29 @@ ReadSQLFile(filename string)
|
|
|
428
428
|
|
|
429
429
|
```go
|
|
430
430
|
type Formula struct {
|
|
431
|
-
Name string
|
|
432
|
-
Type
|
|
433
|
-
Expr string
|
|
434
|
-
Key string
|
|
431
|
+
Name string `json:"name"`
|
|
432
|
+
Type FieldType `json:"type"`
|
|
433
|
+
Expr string `json:"expr"`
|
|
434
|
+
Key string `json:"key"`
|
|
435
435
|
}
|
|
436
436
|
```
|
|
437
437
|
|
|
438
|
-
###
|
|
438
|
+
### 枚举常量(优先使用常量)
|
|
439
439
|
|
|
440
|
-
|
|
440
|
+
JOIN 类型、筛选组合、操作符、聚合类型、UNION 类型、字段/公式类型都是命名类型,
|
|
441
|
+
框架提供同名常量,命名规则是 `<类型前缀> + 去掉下划线的值`(`COUNT_DISTINCT` → `AggrTypeCOUNTDISTINCT`)。
|
|
442
|
+
**优先写常量**:常量名拼错会在 `export` 求值脚本时直接报 `undefined`,而字符串字面量拼错要等到图校验阶段才发现。
|
|
443
|
+
字符串字面量(`"INNER"`)仍然可用(存量脚本无需修改,`guanetl lint` 会提示改用常量);
|
|
444
|
+
把 `string` 变量传给枚举参数需要显式转换,例如 `JoinType(v)`。
|
|
441
445
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
- `CONTAINS` `NOT_CONTAINS`
|
|
452
|
-
- `STARTSWITH` `NOT_STARTSWITH`
|
|
453
|
-
- `ENDSWITH` `NOT_ENDSWITH`
|
|
454
|
-
|
|
455
|
-
当前限制:
|
|
456
|
-
|
|
457
|
-
- `BasicFilterRows` 暂不支持 `IS_NULL` / `NOT_NULL`;null 过滤请使用 `BasicSqlScript`。
|
|
458
|
-
|
|
459
|
-
JOIN 类型:
|
|
460
|
-
|
|
461
|
-
- `INNER`
|
|
462
|
-
- `LEFT_OUTER`
|
|
463
|
-
- `RIGHT_OUTER`
|
|
464
|
-
- `FULL_OUTER`
|
|
465
|
-
|
|
466
|
-
聚合类型:
|
|
467
|
-
|
|
468
|
-
- `SUM`
|
|
469
|
-
- `COUNT`
|
|
470
|
-
- `COUNT_DISTINCT`
|
|
471
|
-
- `MIN`
|
|
472
|
-
- `MAX`
|
|
473
|
-
- `AVG`
|
|
474
|
-
- `FIRST_NOT_NULL`
|
|
475
|
-
|
|
476
|
-
APPEND_ROWS unionType:
|
|
477
|
-
|
|
478
|
-
- `INCLUDE_SHARED`
|
|
479
|
-
- `INCLUDE_ALL`
|
|
480
|
-
- `INCLUDE_FROM`
|
|
446
|
+
| 枚举 | 常量 | 说明 |
|
|
447
|
+
|---|---|---|
|
|
448
|
+
| 筛选组合 `CombineType` | `CombineTypeAND` `CombineTypeOR` | |
|
|
449
|
+
| 筛选操作符 `FilterOperator` | `FilterOpEQ` `FilterOpNE` `FilterOpLT` `FilterOpLE` `FilterOpGT` `FilterOpGE` `FilterOpIN` `FilterOpBT` `FilterOpCONTAINS` `FilterOpNOTCONTAINS` `FilterOpSTARTSWITH` `FilterOpNOTSTARTSWITH` `FilterOpENDSWITH` `FilterOpNOTENDSWITH` | `FilterOpISNULL` / `FilterOpNOTNULL` 当前后端 FILTER_ROWS 不支持,null 过滤请用 `BasicSqlScript` |
|
|
450
|
+
| 筛选值类型 `FilterValueType` | `FilterValueTypeVALUE` `FilterValueTypeCOLUMN` | 通常经 `BasicFilterValue` / `BasicFilterColumnValue` 间接使用 |
|
|
451
|
+
| JOIN 类型 `JoinType` | `JoinTypeINNER` `JoinTypeLEFTOUTER` `JoinTypeRIGHTOUTER` `JoinTypeFULLOUTER` | 服务端把 FULL_OUTER 记为 OUTER,框架自动转换 |
|
|
452
|
+
| 聚合类型 `AggregationType` | `AggrTypeSUM` `AggrTypeCOUNT` `AggrTypeCOUNTDISTINCT` `AggrTypeMIN` `AggrTypeMAX` `AggrTypeAVG` `AggrTypeFIRSTNOTNULL` | 服务端记为 SUM/CNT/CNT_DISTINCT/MIN/MAX/AVG/NUL,框架自动转换 |
|
|
453
|
+
| APPEND_ROWS `UnionType` | `UnionTypeINCLUDESHARED` `UnionTypeINCLUDEALL` `UnionTypeINCLUDEFROM` | |
|
|
454
|
+
| 字段/公式类型 `FieldType` | `FieldTypeINT` `FieldTypeDOUBLE` `FieldTypeSTRING` `FieldTypeTIMESTAMP` `FieldTypeLONG` `FieldTypeSHORT` `FieldTypeFLOAT` `FieldTypeDATE` `FieldTypeBOOL` `FieldTypeDECIMAL` `FieldTypeARRAY` | `Formula.Type` 只能取这些值;`BasicInputDataset` 的字段类型来自服务端,可能超出该列表,按 `guancli ds get` 的结果照写即可 |
|
|
481
455
|
|
|
482
456
|
`BasicAppendRows` 会按列名对齐各输入源。参与拼接的同名列类型必须一致;例如一侧为 `DATE`、另一侧为 `LONG` 会在 `export` 阶段报错。遇到冲突时,先用 `BasicCalculator` / `BasicSelectColumns` 把各源字段统一类型或移除不用的冲突列,再执行行拼接。
|
|
@@ -54,7 +54,7 @@ func DefineWorkflow() Workflow {
|
|
|
54
54
|
py := PythonNode("python_1", "汇总分析", PythonConfig{
|
|
55
55
|
InputDatasets: []string{"<输入数据集ID>"},
|
|
56
56
|
Outputs: []PythonOutput{
|
|
57
|
-
{Name: "销售汇总", ParentDirID: "<数据集目录ID>", UpdateMode:
|
|
57
|
+
{Name: "销售汇总", ParentDirID: "<数据集目录ID>", UpdateMode: UpdateModeOVERWRITE},
|
|
58
58
|
},
|
|
59
59
|
}, After(df)) // 依赖:df 成功后运行
|
|
60
60
|
|
|
@@ -181,7 +181,7 @@ PythonConfig{
|
|
|
181
181
|
ClearDatasetBinding: false, // 显式解除 edit 回读的已有 dsId 绑定
|
|
182
182
|
Created: false, // true 仅表示数据集由当前工作流创建
|
|
183
183
|
ParentDirID: "<数据集目录ID>", // 必填,guancli dir tree 可查
|
|
184
|
-
UpdateMode:
|
|
184
|
+
UpdateMode: UpdateModeOVERWRITE, // UpdateModeOVERWRITE(覆盖)/ UpdateModeAPPEND(追加),默认 OVERWRITE;字面量 "OVERWRITE" 仍可用
|
|
185
185
|
PrimaryKeys: []string{"id"}, // 可选,按主键去重
|
|
186
186
|
Desc: "描述", // 可选
|
|
187
187
|
},
|
|
@@ -46,13 +46,13 @@ node_1005 := BasicOutputDatasource("id_1005", "数据回写", node_1004, OutputD
|
|
|
46
46
|
AcId: "ac_xxx",
|
|
47
47
|
CnId: "cn_yyy",
|
|
48
48
|
TargetTable: "target_table",
|
|
49
|
-
UpdateMode:
|
|
49
|
+
UpdateMode: UpdateModeOVERWRITE,
|
|
50
50
|
})
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
配置说明:
|
|
54
54
|
- `TargetTable`: 目标表名
|
|
55
|
-
- `UpdateMode`: `
|
|
55
|
+
- `UpdateMode`: `UpdateModeOVERWRITE`(覆盖)、`UpdateModeAPPEND`(追加)、`UpdateModeUPSERT`(更新插入);字面量 `"OVERWRITE"` 等仍可用,`guanetl lint` 会提示改用常量
|
|
56
56
|
- `Schema`: 目标 schema(可选)
|
|
57
57
|
- `PrimaryKeys`: UPSERT 模式的主键列
|
|
58
58
|
- `PreSql`/`PostSql`: 写入前/后执行的 SQL(可选)
|
|
@@ -69,7 +69,7 @@ node_1006 := LoadNodeFromFile("node_1006.json", node_1005)
|
|
|
69
69
|
配置说明:
|
|
70
70
|
- `OutputDsId`: 输出数据集 ID(序列化为服务端的 `dsId` 键;绑定已有数据集时填写)
|
|
71
71
|
- `ParentDirID`: 输出数据集目录(DATA_SET 目录树 id,新建输出必填,缺失会导致运行期报错)
|
|
72
|
-
- `UpdateMode`: `
|
|
72
|
+
- `UpdateMode`: `UpdateModeAPPEND`(追加)或 `UpdateModeUPSERT`(更新插入)
|
|
73
73
|
- `PrimaryKeys`: UPSERT 模式的主键列
|
|
74
74
|
|
|
75
75
|
推荐优先使用透传模式(LoadNodeFromFile),可保留服务端节点的全部配置。
|