@dazitech/cli 3.0.9 → 3.1.0
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/README.md +1 -1
- package/dist/clis/dazi-app.js +1 -1
- package/dist/clis/dazi-flow.js +1 -1
- package/dist/clis/dazi-onto.js +7 -2
- package/dist/clis/dazi.js +1 -1
- package/dist/docs/flow/flow-project-guide.md +1 -1
- package/dist/docs/guides/troubleshooting.md +3 -3
- package/dist/docs/index.json +3 -3
- package/dist/docs/onto/dazi_script_sdk_reference.md +246 -244
- package/dist/docs/onto/function-guide.md +123 -123
- package/dist/docs/onto//346/234/254/344/275/223/345/210/206/347/261/273/350/247/204/345/210/222/344/270/216SDK/346/211/251/345/261/225/346/226/271/346/241/210.md +24 -23
- package/dist/docs/onto//346/234/254/344/275/223/345/221/275/345/220/215/350/247/204/350/214/203_/347/211/251/347/220/206/350/241/250Cube/344/270/216/345/257/271/350/261/241.md +402 -402
- package/dist/docs/onto//346/234/254/344/275/223/345/274/200/345/217/221/344/274/230/345/214/226/346/200/273/347/273/223.md +242 -0
- package/dist/docs/onto//346/234/254/344/275/223/350/204/232/346/234/254/347/274/226/345/206/231/346/214/207/345/215/227.md +339 -311
- package/dist/docs/onto//346/234/254/344/275/223/350/247/204/345/210/222/346/214/207/345/215/227.md +304 -281
- package/dist/docs/onto//350/204/232/346/234/254/350/277/220/350/241/214/345/270/270/350/247/201/351/224/231/350/257/257/345/244/204/347/220/206.md +242 -0
- package/dist/docs/onto//350/247/204/345/210/222/347/244/272/344/276/213_/344/272/247/345/223/201/351/224/200/345/224/256/346/234/254/344/275/223/350/247/204/345/210/222/346/226/271/346/241/210.md +32 -32
- package/dist/docs/onto//350/247/204/345/210/222/347/244/272/344/276/213_/345/210/251/346/266/246/345/210/206/346/236/220/346/234/254/344/275/223/346/226/271/346/241/210.md +34 -32
- package/dist/examples/index.json +1 -1
- package/dist/examples/onto//345/210/251/346/266/246/347/244/272/344/276/213/setup/profit_category_mount.py +85 -0
- package/dist/examples/onto//345/210/251/346/266/246/347/244/272/344/276/213/setup/profit_ontology_init.py +2 -65
- package/dist/examples/onto//351/224/200/345/224/256/347/244/272/344/276/213/setup/sales_category_mount.py +82 -0
- package/dist/examples/onto//351/224/200/345/224/256/347/244/272/344/276/213/setup/sales_ontology_init.py +2 -53
- package/dist/prompts/index.json +8 -1
- package/dist/prompts/onto/function-design.md +73 -73
- package/dist/prompts/onto/planning-design.md +104 -0
- package/dist/prompts/onto/script-publish-run.md +229 -208
- package/package.json +1 -1
- package/dist/docs/onto//350/204/232/346/234/254/350/277/220/350/241/214/347/272/240/351/224/231_/345/225/206/345/212/241/346/210/220/346/234/254/346/226/271/346/241/210/345/274/200/345/217/221/350/277/207/347/250/213.md +0 -213
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# 脚本运行常见错误处理
|
|
2
|
+
|
|
3
|
+
**文档 ID**: `onto/script-run-troubleshooting`
|
|
4
|
+
**级别**: **执行脚本前必读(强制)** — 在终端执行 `dazi onto script publish` / `script run` / `function run` / `save-test-arguments` **之前**须通读
|
|
5
|
+
**适用**: 本体 `setup/`、`functions/` 脚本编写、发布与运行;智能体见提示词 `onto/script-publish-run`
|
|
6
|
+
|
|
7
|
+
> 路径占位:`<项目路径>` = `项目/<业务名>/本体/ontos/<实现名>`,`<空间>` 取自实现单元 `README.md`。
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. setup 脚本 API 误用
|
|
12
|
+
|
|
13
|
+
| 错误写法 | 正确写法 | 说明 |
|
|
14
|
+
| -------- | -------- | ---- |
|
|
15
|
+
| `s.onto.sync_metrics()` | 删除;必要时 `s.sync_metric_refs()` | `sync_metrics` 不存在 |
|
|
16
|
+
| `s.cubes.upsert(...)` | `s.register_cube(...)` | 无 `s.cubes` |
|
|
17
|
+
| `define_object_type(code, label=name)` | `define_object_type(code, name=...)` | 第二参数为 `name` |
|
|
18
|
+
| `define_object_type(title=...)` | `define_object_type(name=...)` | 参数名为 `name` |
|
|
19
|
+
| `bind_source(source_type=..., source_name=...)` | `bind_source(obj_code, "dazi_cube", config={"cube": "CubeName"})` | 见利润/销售示例 |
|
|
20
|
+
| `define_property(object_type_code=..., title=...)` | `define_property(obj_code, code, name, ...)` | 位置参数 |
|
|
21
|
+
| `define_link_type(title=..., from_object_type=...)` | `define_link_type(name=..., from_object_type_code=..., to_object_type_code=...)` | 以 `_code` 结尾 |
|
|
22
|
+
|
|
23
|
+
**教训**:对照 `资源/examples/onto/利润示例`、`销售示例` 的 init,勿猜 API。
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 2. SQL 聚合:`query_one` 返回类型
|
|
28
|
+
|
|
29
|
+
**现象**:`float' object has no attribute 'get'`
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
# 错误
|
|
33
|
+
total_row = p.sql.query_one("SELECT sum(amount) AS grand_total FROM ...")
|
|
34
|
+
grand_total = float(total_row.get("grand_total", 0))
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**原因**:聚合场景下 `query_one()` 可能返回标量而非字典行。
|
|
38
|
+
|
|
39
|
+
**修复**:
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
total_rows = p.sql.query("SELECT sum(amount) AS grand_total FROM ...")
|
|
43
|
+
total_row = total_rows[0] if total_rows else {}
|
|
44
|
+
grand_total = float(total_row.get("grand_total", 0) or 0)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 3. 函数输出:禁止 `output.print_json`
|
|
50
|
+
|
|
51
|
+
**现象**:`AttributeError: 'OutputModule' has no attribute 'print_json'`
|
|
52
|
+
|
|
53
|
+
本体函数须 **`return`** 结构化结果,不能当 setup 脚本用 `output` 打印 JSON。
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
def _ontology_fn_body(p):
|
|
57
|
+
rows = p.sql.query("SELECT ...")
|
|
58
|
+
return p.function_result(columns=[...], data=rows, row_count=len(rows))
|
|
59
|
+
|
|
60
|
+
def main():
|
|
61
|
+
s = space.get(ctx.space_id or "")
|
|
62
|
+
# 组装 p(见 ontology_function_template.py)
|
|
63
|
+
return _ontology_fn_body(p)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**禁止**:`output.print_json()`、`main(params: dict)`、裸 `return {"k": v}` 代替 `function_result`。
|
|
67
|
+
|
|
68
|
+
**模板**:`资源/examples/onto/_templates/ontology_function_template.py`
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 4. CLI 参数误用
|
|
73
|
+
|
|
74
|
+
### 4.1 `function run` 不支持 `--arguments-json-file`
|
|
75
|
+
|
|
76
|
+
```powershell
|
|
77
|
+
# 错误
|
|
78
|
+
dazi onto function run <function_id> --space <空间> --arguments-json-file xxx.json
|
|
79
|
+
|
|
80
|
+
# 正确:先 save-test-arguments,再 run(不带 JSON 文件)
|
|
81
|
+
dazi onto function run <function_id> --space <空间>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 4.2 `save-test-arguments` 须用 `ofn_xxx` 内部 ID
|
|
85
|
+
|
|
86
|
+
```powershell
|
|
87
|
+
# 错误 — function_id 字符串
|
|
88
|
+
dazi onto function save-test-arguments profit.fn.get_summary --space <空间> ...
|
|
89
|
+
|
|
90
|
+
# 正确 — list 返回的 id 字段
|
|
91
|
+
dazi onto function list --space <空间>
|
|
92
|
+
dazi onto function save-test-arguments ofn_xxxxxxxx --space <空间> `
|
|
93
|
+
--arguments-json-file <项目路径>/functions/test_arguments/<function_id>.json
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 4.3 函数发布未带 `--register-function-id`
|
|
97
|
+
|
|
98
|
+
仅 `script publish` 时代码入库,**不会**出现在 Onto → 函数列表,`function run` 失败。
|
|
99
|
+
|
|
100
|
+
```powershell
|
|
101
|
+
dazi onto script publish <项目路径>/functions/xxx_fn.py --space <空间> `
|
|
102
|
+
--register-function-id <domain>.fn.<name>
|
|
103
|
+
dazi onto function list --space <空间> # 必须能看到该 id
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
可选同时挂载平台分类:`--register-platform-category 总览分析`
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## 5. 函数「未注册」(规划有、侧栏无)
|
|
111
|
+
|
|
112
|
+
| 现象 | 根因 |
|
|
113
|
+
| ---- | ---- |
|
|
114
|
+
| `CATEGORY_REGISTRY` / plans 列了 N 个函数 | 规划清单 ≠ 已发布函数 |
|
|
115
|
+
| `functions/` 文件数 < 规划数 | 脚本未写完 |
|
|
116
|
+
| `function list` 只有 1 条 | 多数未 `publish --register-function-id` |
|
|
117
|
+
|
|
118
|
+
**结论**:init **不负责**注册本体函数;每个 `functions/*.py` 须单独 publish 并注册。
|
|
119
|
+
|
|
120
|
+
**门禁**:规划函数数 = `functions/*.py` 数 = `function list` 条数。
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 6. 平台分类挂载时机
|
|
125
|
+
|
|
126
|
+
**推荐**:与灌数一样,使用独立 `setup/*_category_mount.py`,放在流程**最后**:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
init → seed → 发布全部函数 → category_mount
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
| 方式 | 何时 |
|
|
133
|
+
| ---- | ---- |
|
|
134
|
+
| **`*_category_mount.py`**(推荐) | 全量 `CATEGORY_REGISTRY` + `apply_registry`;函数齐后一次执行 |
|
|
135
|
+
| `--register-platform-category` | 单函数 publish 时内联(与 category_mount 幂等可并存) |
|
|
136
|
+
| init 内 `apply_registry` | **不推荐**(函数未 publish 时 function 段被跳过,须重跑 init) |
|
|
137
|
+
|
|
138
|
+
`skip_missing=True` 时,未注册函数会被跳过;**补发函数后只重跑 category_mount**,无需重跑 init。
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 7. 平台分类字典报错
|
|
143
|
+
|
|
144
|
+
**现象**:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
ValueError: 平台分类字典中不存在分类: kind='table', category='维度表'
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
(旧版日志可能显示乱码,非脚本 UTF-8 损坏。)
|
|
151
|
+
|
|
152
|
+
**原因**:`category` 须为**平台标准分类中文名**(如「维度表」「事实表」),且测试环境 backend 须含完整平台分类字典。
|
|
153
|
+
|
|
154
|
+
**处理**:
|
|
155
|
+
|
|
156
|
+
1. 确认 `CATEGORY_REGISTRY` 使用标准名,与 [本体分类规划与SDK扩展方案](./本体分类规划与SDK扩展方案.md) 一致
|
|
157
|
+
2. 部署含 `s.categories` 与表类中文名索引的 backend 版本
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## 8. 表/列显示名未写入
|
|
162
|
+
|
|
163
|
+
仅用 `register` + `sync_columns` 时,列 `description` **不会**自动写入规划中的业务说明。
|
|
164
|
+
|
|
165
|
+
**推荐**:
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
s.tables.register_with_meta(
|
|
169
|
+
table_name,
|
|
170
|
+
display_name=meta["display_name"],
|
|
171
|
+
description=meta.get("description"),
|
|
172
|
+
columns=meta["columns"],
|
|
173
|
+
force_column_meta=True,
|
|
174
|
+
)
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
见 [本体脚本编写指南 · 表注册](./本体脚本编写指南.md#表注册-table_registry--register_with_meta)。
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## 9. 标准 CLI 顺序(通用)
|
|
182
|
+
|
|
183
|
+
在 `dazi-work` 根目录,将 `<项目路径>`、`<空间>` 替换为实际值。
|
|
184
|
+
|
|
185
|
+
```powershell
|
|
186
|
+
# 1. init
|
|
187
|
+
dazi onto script publish <项目路径>/setup/xxx_ontology_init.py --space <空间> --type setup
|
|
188
|
+
dazi onto script run --file <项目路径>/setup/xxx_ontology_init.py --space <空间>
|
|
189
|
+
|
|
190
|
+
# 2. seed(如有)
|
|
191
|
+
dazi onto script publish <项目路径>/setup/xxx_seed_data.py --space <空间> --type data
|
|
192
|
+
dazi onto script run --file <项目路径>/setup/xxx_seed_data.py --space <空间>
|
|
193
|
+
|
|
194
|
+
# 3. 每个本体函数
|
|
195
|
+
dazi onto script publish <项目路径>/functions/xxx_fn.py --space <空间> `
|
|
196
|
+
--register-function-id <domain>.fn.<name> `
|
|
197
|
+
--register-platform-category <平台分类名>
|
|
198
|
+
|
|
199
|
+
# 4. 平台分类挂载(最后一步,类灌数)
|
|
200
|
+
dazi onto script publish <项目路径>/setup/xxx_category_mount.py --space <空间> --type setup
|
|
201
|
+
dazi onto script run --file <项目路径>/setup/xxx_category_mount.py --space <空间>
|
|
202
|
+
|
|
203
|
+
# 5. 测试参数与验证
|
|
204
|
+
dazi onto function list --space <空间>
|
|
205
|
+
dazi onto function save-test-arguments <ofn_id> --space <空间> --arguments-json-file ...
|
|
206
|
+
dazi onto function run <function_id> --space <空间>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## 10. 修改脚本后的重发流程
|
|
212
|
+
|
|
213
|
+
| 脚本类型 | 操作 |
|
|
214
|
+
| -------- | ---- |
|
|
215
|
+
| setup / data | `script publish` → `script run` |
|
|
216
|
+
| 本体函数 | `script publish`(含 `--register-function-id`)→ `function run` → 参数变更时重做 `save-test-arguments` |
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## 11. 命令速查
|
|
221
|
+
|
|
222
|
+
| 目的 | 命令 |
|
|
223
|
+
| ---- | ---- |
|
|
224
|
+
| 发布 setup | `dazi onto script publish <path> --space <空间> --type setup` |
|
|
225
|
+
| 发布 data | `dazi onto script publish <path> --space <空间> --type data` |
|
|
226
|
+
| 发布并注册函数 | `... --register-function-id <id> [--register-platform-category <分类>]` |
|
|
227
|
+
| 执行脚本 | `dazi onto script run --file <path> --space <空间>` |
|
|
228
|
+
| 运行函数 | `dazi onto function run <function_id> --space <空间>` |
|
|
229
|
+
| 函数列表 | `dazi onto function list --space <空间>` |
|
|
230
|
+
| 保存默认参数 | `dazi onto function save-test-arguments <ofn_id> --space <空间> --arguments-json-file <json>` |
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## 12. 相关文档
|
|
235
|
+
|
|
236
|
+
| 文档 | 说明 |
|
|
237
|
+
| ---- | ---- |
|
|
238
|
+
| [本体脚本编写指南](./本体脚本编写指南.md) | 目录、四阶段实施、test_arguments |
|
|
239
|
+
| [本体函数开发指南](./function-guide.md) | 函数模板、`save-test-arguments` |
|
|
240
|
+
| [DaziScript SDK 参考](./dazi_script_sdk_reference.md) | API 与 `s.categories` |
|
|
241
|
+
| [本体开发优化总结](./本体开发优化总结.md) | 表显示名、平台分类、函数四阶段 |
|
|
242
|
+
| [故障排查](../guides/troubleshooting.md) | CLI 环境、401、侧栏空白 |
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
**文档 ID**: `onto/planning-example-product-sales`
|
|
4
4
|
|
|
5
|
-
>
|
|
5
|
+
> **只读参照**:本体规划阶段**首选结构示例**(非可复制模板)。覆盖物理表、**表间关系**、Cube、本体链接、函数与 **test_arguments** 完整落地;**不得**整篇粘贴为本项目 `plans/`。须独立撰写并写差异说明(见 [本体规划指南 · 任务模式](./本体规划指南.md#任务模式与反模式))。
|
|
6
|
+
|
|
7
|
+
> 表/Cube/对象命名遵循 [本体命名规范](./本体命名规范_物理表Cube与对象.md)。
|
|
6
8
|
> 补充示例(利润分析域):[规划示例_利润分析本体方案.md](./规划示例_利润分析本体方案.md)
|
|
7
9
|
|
|
8
10
|
**占位符**(复制到工作区 `plans/` 后替换为实际值):
|
|
@@ -53,7 +55,7 @@
|
|
|
53
55
|
|
|
54
56
|
**物理表清单**(命名见 [命名规范 §2](./本体命名规范_物理表Cube与对象.md#2-物理表类别与前缀)):
|
|
55
57
|
|
|
56
|
-
| 表名 | 前缀类别 |
|
|
58
|
+
| 表名 | 前缀类别 | **平台分类** | 显示名 | 说明 | 角色 |
|
|
57
59
|
| ---- | -------- | ------------ | ------ | ---- | ---- |
|
|
58
60
|
| **`dim_date`** | 时间维(**强制**) | **时间维** | 日期维表 | 全空间共享;PK **`date_key`** | 时间维 |
|
|
59
61
|
| `dim_product` | dim | **维度表** | 产品维表 | 可售产品主数据 | dim |
|
|
@@ -62,7 +64,7 @@
|
|
|
62
64
|
| **`fact_sales_order_line`** | fact | **事实表** | 销售订单行事实表 | 订单行粒度销售流水;含 **`date_key`** | fact |
|
|
63
65
|
|
|
64
66
|
> 规划原则:**先**定义业务对象(Product、SalesOrder 等)与链接,**再**反推 Cube 与物理表。事实表通过 `date_key` 关联 `dim_date`,支撑同比/环比与时间层次分析。
|
|
65
|
-
> init 脚本 `资源/examples/onto/销售示例/setup/sales_ontology_init.py` 顶部 **`TABLE_REGISTRY`** 与上表及 §3.x 字段 **显示名/说明** 一一对应,经 `s.tables.register_with_meta` 注册;**`CATEGORY_REGISTRY`** 与 [附录 B](#附录-
|
|
67
|
+
> init 脚本 `资源/examples/onto/销售示例/setup/sales_ontology_init.py` 顶部 **`TABLE_REGISTRY`** 与上表及 §3.x 字段 **显示名/说明** 一一对应,经 `s.tables.register_with_meta` 注册;**`CATEGORY_REGISTRY`** 与 [附录 B](#附录-b平台-分类挂载对照表category_registry) 及 `apply_registry` 步骤对齐。
|
|
66
68
|
|
|
67
69
|
---
|
|
68
70
|
|
|
@@ -189,7 +191,7 @@
|
|
|
189
191
|
|
|
190
192
|
**关系清单(5 条)**:
|
|
191
193
|
|
|
192
|
-
| 关系 ID |
|
|
194
|
+
| 关系 ID | **平台分类** | 类型 | 从表 | 到表 | join_keys | 说明 |
|
|
193
195
|
| ------- | ------------ | ---- | ---- | ---- | --------- | ---- |
|
|
194
196
|
| rel_sales_date | **时间关联** | many_to_one | fact_sales_order_line | dim_date | date_key → date_key | 订单行关联日历 |
|
|
195
197
|
| rel_sales_product | **主数据关联** | many_to_one | fact_sales_order_line | dim_product | product_id → product_id | 订单行关联产品 |
|
|
@@ -235,7 +237,7 @@ s.tables.add_relationship(
|
|
|
235
237
|
|
|
236
238
|
### 4.0 Cube 清单与类别
|
|
237
239
|
|
|
238
|
-
| Cube | 类别 |
|
|
240
|
+
| Cube | 类别 | **平台分类** | 事实源 | 时间维 | 支撑对象 |
|
|
239
241
|
| ---- | ---- | ------------ | ------ | ------ | -------- |
|
|
240
242
|
| **SalesCube** | Process | **流程型** | fact_sales_order_line | dim_date(year/month/quarter) | SalesOrder, SalesAnalysis |
|
|
241
243
|
| **ProductSalesCube** | Subject | **主体型** | fact_sales_order_line | 同上 | Product |
|
|
@@ -299,7 +301,7 @@ s.tables.add_relationship(
|
|
|
299
301
|
|
|
300
302
|
### 5.1 对象类型(5 种)
|
|
301
303
|
|
|
302
|
-
| code | 分类 |
|
|
304
|
+
| code | 分类 | **平台分类** | 名称 | bind_source | 主物理支撑 |
|
|
303
305
|
| ---- | ---- | ------------ | ---- | ------------- | ---------- |
|
|
304
306
|
| Product | Master | **主数据** | 产品 | ProductSalesCube | dim_product |
|
|
305
307
|
| Customer | Master | **主数据** | 客户 | CustomerSalesCube | dim_customer |
|
|
@@ -339,7 +341,7 @@ s.tables.add_relationship(
|
|
|
339
341
|
|
|
340
342
|
### 5.3 链接类型(8 种)
|
|
341
343
|
|
|
342
|
-
| 链接 code |
|
|
344
|
+
| 链接 code | **平台分类** | 名称 | from | to | 说明 |
|
|
343
345
|
| ---------------------- | ------------ | -------------- | ------------- | ------------- | -------------------- |
|
|
344
346
|
| order_contains_product | **归属关系** | 订单包含产品 | SalesOrder | Product | 订单行对应产品 |
|
|
345
347
|
| order_belongs_customer | **归属关系** | 订单归属客户 | SalesOrder | Customer | 订单归属客户 |
|
|
@@ -367,7 +369,7 @@ s.tables.add_relationship(
|
|
|
367
369
|
|
|
368
370
|
### 6.1 函数清单
|
|
369
371
|
|
|
370
|
-
| 函数 ID |
|
|
372
|
+
| 函数 ID | **平台分类** | 功能 | 参数 |
|
|
371
373
|
| --------------------------------- | ------------ | ------------ | ------------------------------------------------- |
|
|
372
374
|
| sales.fn.get_summary | **总览分析** | 销售总览 | start_date, end_date(可选) |
|
|
373
375
|
| sales.fn.yoy_analysis | **趋势分析** | 同比分析 | start_date, end_date |
|
|
@@ -458,24 +460,22 @@ JSON 格式须含 `v`、`arguments`、`object_type_code`(与平台函数定义
|
|
|
458
460
|
| 11 | define_property(约 29 个) |
|
|
459
461
|
| 12 | define_link_type(8 种) |
|
|
460
462
|
| 13 | sync_metric_refs |
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
### 7.4 阶段四:函数与数据(中)
|
|
463
|
+
### 7.4 阶段四:灌数、函数与分类(中)
|
|
464
464
|
|
|
465
465
|
| 步骤 | 任务 |
|
|
466
466
|
| ---- | -------------------------------------------------------------------- |
|
|
467
|
-
| 14 |
|
|
468
|
-
| 15 |
|
|
469
|
-
| 16 |
|
|
470
|
-
| 17 | **`
|
|
467
|
+
| 14 | seed 灌数:**dim_date** + 维表 + fact(写入 date_key) |
|
|
468
|
+
| 15 | 从 `销售示例/functions/sales_fn_*.py` 复制并适配;**publish --register-function-id** |
|
|
469
|
+
| 16 | `function run` + **`save-test-arguments`**(侧栏预填;见 §6.4) |
|
|
470
|
+
| 17 | **`sales_category_mount.py`**:`CATEGORY_REGISTRY` + `apply_registry`(**最后**,类灌数) |
|
|
471
471
|
|
|
472
|
-
### 7.5
|
|
472
|
+
### 7.5 实施阶段参考(须 plans 已定稿后)
|
|
473
473
|
|
|
474
|
-
|
|
474
|
+
`资源/examples/onto/销售示例/setup/sales_ontology_init.py` 含完整 init 逻辑,与本文 §2.3、§3.x 对齐,供 **对照实施** 时参考:
|
|
475
475
|
|
|
476
|
-
1.
|
|
477
|
-
2.
|
|
478
|
-
3.
|
|
476
|
+
1. 确认 `plans/` 已定稿并通过自检(快速启动 §3 门禁)
|
|
477
|
+
2. 按需借鉴或复制示例 init/seed,**按本实现 plans 改造**表名与元数据
|
|
478
|
+
3. 改 `space_id` 后按 [本体脚本编写指南](./本体脚本编写指南.md) 发布执行
|
|
479
479
|
|
|
480
480
|
---
|
|
481
481
|
|
|
@@ -500,7 +500,7 @@ JSON 格式须含 `v`、`arguments`、`object_type_code`(与平台函数定义
|
|
|
500
500
|
| **表间关系** | **4 条**(含 fact → dim_date) |
|
|
501
501
|
| Cube | **4 个** Cube;SalesCube 含时间维 |
|
|
502
502
|
| 对象类型 | 5 种 + 分类列;8 种链接 |
|
|
503
|
-
|
|
|
503
|
+
| **平台侧栏分类** | 侧栏分类名与附录 B 一致;`category_mount` 重跑幂等 |
|
|
504
504
|
| 函数 | get_summary、top_products 可运行 |
|
|
505
505
|
| test_arguments | 各 function_id 已 save-test-arguments |
|
|
506
506
|
| 数据 | 种子灌入后指标与手工 SQL 一致 |
|
|
@@ -519,13 +519,13 @@ JSON 格式须含 `v`、`arguments`、`object_type_code`(与平台函数定义
|
|
|
519
519
|
|
|
520
520
|
---
|
|
521
521
|
|
|
522
|
-
## 附录 B
|
|
522
|
+
## 附录 B:平台分类挂载对照表(CATEGORY_REGISTRY)
|
|
523
523
|
|
|
524
|
-
与 `销售示例/setup/
|
|
524
|
+
与 `销售示例/setup/sales_category_mount.py` 顶部 **`CATEGORY_REGISTRY`** 一一对应;平台 `category_name` **=** 平台标准分类中文名(见 [本体分类规划与SDK扩展方案](./本体分类规划与SDK扩展方案.md))。**init 不含分类挂载**;本附录在 **全部函数 publish 后** 由 `category_mount` 脚本执行。
|
|
525
525
|
|
|
526
526
|
### B.1 物理表(table)
|
|
527
527
|
|
|
528
|
-
|
|
|
528
|
+
| 平台分类 | 表名 |
|
|
529
529
|
| -------- | ---- |
|
|
530
530
|
| 时间维 | dim_date |
|
|
531
531
|
| 维度表 | dim_product, dim_customer, dim_channel |
|
|
@@ -533,14 +533,14 @@ JSON 格式须含 `v`、`arguments`、`object_type_code`(与平台函数定义
|
|
|
533
533
|
|
|
534
534
|
### B.2 Cube(cube)
|
|
535
535
|
|
|
536
|
-
|
|
|
536
|
+
| 平台分类 | Cube |
|
|
537
537
|
| -------- | ---- |
|
|
538
538
|
| 流程型 | SalesCube |
|
|
539
539
|
| 主体型 | ProductSalesCube, CustomerSalesCube, ChannelSalesCube |
|
|
540
540
|
|
|
541
541
|
### B.3 对象类型(object)
|
|
542
542
|
|
|
543
|
-
|
|
|
543
|
+
| 平台分类 | code |
|
|
544
544
|
| -------- | ---- |
|
|
545
545
|
| 主数据 | Product, Customer |
|
|
546
546
|
| 参考 | SalesChannel |
|
|
@@ -549,23 +549,23 @@ JSON 格式须含 `v`、`arguments`、`object_type_code`(与平台函数定义
|
|
|
549
549
|
|
|
550
550
|
### B.4 表间关系(relation)
|
|
551
551
|
|
|
552
|
-
|
|
|
552
|
+
| 平台分类 | 从表 → 到表 |
|
|
553
553
|
| -------- | ----------- |
|
|
554
554
|
| 时间关联 | fact_sales_order_line → dim_date |
|
|
555
555
|
| 主数据关联 | fact_sales_order_line → dim_product / dim_customer / dim_channel |
|
|
556
556
|
|
|
557
557
|
### B.5 链接类型(link)
|
|
558
558
|
|
|
559
|
-
|
|
|
559
|
+
| 平台分类 | link code |
|
|
560
560
|
| -------- | --------- |
|
|
561
561
|
| 归属关系 | order_contains_product, order_belongs_customer, order_via_channel, product_has_orders, customer_places_orders |
|
|
562
562
|
| 分析归因 | analysis_by_product, analysis_by_customer, analysis_by_channel |
|
|
563
563
|
|
|
564
564
|
### B.6 本体函数(function)
|
|
565
565
|
|
|
566
|
-
init
|
|
566
|
+
函数在 `functions/` 中 **publish 注册**;`sales_category_mount.py` 在 **init + seed + 全部函数 publish 之后** 统一 `apply_registry`(含 function 段,`skip_missing=True` 可重跑)。建议分类:
|
|
567
567
|
|
|
568
|
-
|
|
|
568
|
+
| 平台分类 | function_id |
|
|
569
569
|
| -------- | ----------- |
|
|
570
570
|
| 总览分析 | sales.fn.get_summary |
|
|
571
571
|
| 趋势分析 | sales.fn.yoy_analysis, sales.fn.mom_analysis |
|
|
@@ -595,7 +595,7 @@ init 脚本**不**注册函数;函数发布后单独执行 `apply_registry`
|
|
|
595
595
|
| 8 | 函数清单 | ☑ |
|
|
596
596
|
| 9 | test_arguments | ☑ |
|
|
597
597
|
| 10 | 实施与验收 | ☑ |
|
|
598
|
-
| 6a–6e |
|
|
598
|
+
| 6a–6e | 平台侧栏分类 | ☑(附录 B + `sales_category_mount.py`) |
|
|
599
599
|
|
|
600
600
|
---
|
|
601
601
|
|
|
@@ -610,7 +610,7 @@ init 脚本**不**注册函数;函数发布后单独执行 `apply_registry`
|
|
|
610
610
|
| 参考实现(init/seed/函数) | `资源/examples/onto/销售示例/` → 复制到 `<item-path>/` |
|
|
611
611
|
| **内置脚本示例** | `资源/examples/onto/销售示例/`(`dazi examples sync` 后复制到实现单元) |
|
|
612
612
|
| 补充示例(利润) | [规划示例_利润分析本体方案.md](./规划示例_利润分析本体方案.md) · `资源/examples/onto/利润示例/` |
|
|
613
|
-
|
|
|
613
|
+
| 分类方案 | [本体分类规划与 SDK 扩展方案](./本体分类规划与SDK扩展方案.md) |
|
|
614
614
|
|
|
615
615
|
---
|
|
616
616
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
**文档 ID**: `onto/planning-example-profit`
|
|
4
4
|
|
|
5
|
+
> **只读参照**:本文档供学习 GL 域规划**结构**与验收口径,**不得**整篇复制为本项目 `plans/` 充数。新建实现须在 `plans/` **独立撰写**,并含「与参照示例的差异说明」章节(见 [本体规划指南 · 任务模式](./本体规划指南.md#任务模式与反模式))。
|
|
6
|
+
|
|
5
7
|
> 表/Cube/对象命名遵循 [本体命名规范](./本体命名规范_物理表Cube与对象.md)。
|
|
6
8
|
> 工程模式参考:[规划示例_产品销售本体规划方案.md](./规划示例_产品销售本体规划方案.md)
|
|
7
9
|
|
|
@@ -59,7 +61,7 @@
|
|
|
59
61
|
|
|
60
62
|
**物理表清单**(命名见 [命名规范 §2](./本体命名规范_物理表Cube与对象.md#2-物理表类别与前缀)):
|
|
61
63
|
|
|
62
|
-
| 表名 | 前缀类别 |
|
|
64
|
+
| 表名 | 前缀类别 | **平台分类** | 显示名 | 说明 | 角色 |
|
|
63
65
|
| ---- | -------- | ------------ | ------ | ---- | ---- |
|
|
64
66
|
| **`dim_date`** | 时间维(**强制**) | **时间维** | 日期维表 | 与 sales 域共用;PK **`date_key`** | 时间维 |
|
|
65
67
|
| `dim_account` | dim | **维度表** | 科目维表 | 会计科目主数据 | dim |
|
|
@@ -68,7 +70,7 @@
|
|
|
68
70
|
| **`fact_budget_entry`** | fact | **事实表** | 预算明细 | 预算行粒度编制数据;含 **date_key** | fact |
|
|
69
71
|
|
|
70
72
|
> 规划原则:先定义 **Account、JournalEntry、BudgetLine** 等业务对象与链接,再反推 Cube 与物理表。旧版 `profit_analysis_fact`(订单粒度)**不作为主模型**。
|
|
71
|
-
> init 脚本 `资源/examples/onto/利润示例/setup/profit_ontology_init.py` 顶部 **`TABLE_REGISTRY`** 与上表及 §3.x 字段 **显示名/说明** 一一对应,经 `s.tables.register_with_meta` 注册;**`CATEGORY_REGISTRY`** 见 [附录 B](#附录-
|
|
73
|
+
> init 脚本 `资源/examples/onto/利润示例/setup/profit_ontology_init.py` 顶部 **`TABLE_REGISTRY`** 与上表及 §3.x 字段 **显示名/说明** 一一对应,经 `s.tables.register_with_meta` 注册;**`CATEGORY_REGISTRY`** 见 [附录 B](#附录-b平台-分类挂载对照表category_registry),由 **`profit_category_mount.py`** 在流程最后执行(init **不含**分类挂载)。
|
|
72
74
|
|
|
73
75
|
## 三、物理层设计
|
|
74
76
|
|
|
@@ -203,7 +205,7 @@
|
|
|
203
205
|
|
|
204
206
|
**关系清单(8 条)**:
|
|
205
207
|
|
|
206
|
-
| 关系 ID |
|
|
208
|
+
| 关系 ID | **平台分类** | 类型 | 从表 | 到表 | join_keys | 说明 |
|
|
207
209
|
| ------- | ------------ | ---- | ---- | ---- | --------- | ---- |
|
|
208
210
|
| rel_journal_date | **时间关联** | many_to_one | fact_gl_journal_entry | dim_date | date_key → date_key | 分录关联日历 |
|
|
209
211
|
| rel_budget_date | **时间关联** | many_to_one | fact_budget_entry | dim_date | date_key → date_key | 预算关联日历 |
|
|
@@ -244,16 +246,16 @@ s.tables.add_relationship(
|
|
|
244
246
|
|
|
245
247
|
### 4.0 Cube 清单与类别
|
|
246
248
|
|
|
247
|
-
| Cube | 类别 |
|
|
249
|
+
| Cube | 类别 | **平台分类** | 事实源 | 时间维 | 支撑对象 |
|
|
248
250
|
| ---- | ---- | ------------ | ------ | ------ | -------- |
|
|
249
251
|
| **ActualCube** | Process | **流程型** | fact_gl_journal_entry | dim_date + fiscal_* | JournalEntry, ProfitAnalysis |
|
|
250
252
|
| **AccountActualCube** | Subject | **主体型** | fact_gl_journal_entry | 同上 | Account |
|
|
251
253
|
| **CostCenterActualCube** | Subject | **主体型** | fact_gl_journal_entry | 同上 | CostCenter |
|
|
252
254
|
| **BudgetCube** | Process | **流程型** | fact_budget_entry | 同上 | BudgetLine, BudgetAnalysis |
|
|
253
|
-
| **TimeActualCube** | Subject | **主体型** | fact_gl_journal_entry | 同上 | (时间切片;**init
|
|
255
|
+
| **TimeActualCube** | Subject | **主体型** | fact_gl_journal_entry | 同上 | (时间切片;**init 已注册**,命名规范建议后续并入 Process) |
|
|
254
256
|
| **BudgetVsActualCube** | Comparison | **对比型** | fact_budget_entry + fact_gl_journal_entry | fiscal_year/period | BudgetAnalysis(预实;**规划目标,init 待补**) |
|
|
255
257
|
|
|
256
|
-
>
|
|
258
|
+
> 命名规范 §4.2 建议时间增强不单独建 Cube;当前示例 init 仍含 **TimeActualCube** 并归 **主体型**,后续可合并进 ActualCube 后从注册表移除。
|
|
257
259
|
|
|
258
260
|
### 4.1 ActualCube(Process · 实际发生主 Cube)
|
|
259
261
|
|
|
@@ -322,7 +324,7 @@ s.tables.add_relationship(
|
|
|
322
324
|
|
|
323
325
|
### 5.1 对象类型(6 种)
|
|
324
326
|
|
|
325
|
-
| code | 分类 |
|
|
327
|
+
| code | 分类 | **平台分类** | 名称 | bind_source | 主物理支撑 |
|
|
326
328
|
| ---- | ---- | ------------ | ---- | ------------- | ---------- |
|
|
327
329
|
| Account | Master | **主数据** | 会计科目 | AccountActualCube | dim_account |
|
|
328
330
|
| CostCenter | Master | **主数据** | 成本中心 | CostCenterActualCube | dim_cost_center |
|
|
@@ -376,7 +378,7 @@ s.tables.add_relationship(
|
|
|
376
378
|
|
|
377
379
|
### 5.3 链接类型(10 种)
|
|
378
380
|
|
|
379
|
-
| 链接 code |
|
|
381
|
+
| 链接 code | **平台分类** | 名称 | from | to | 说明 |
|
|
380
382
|
| ------------------------------ | ------------ | ---------------- | -------------- | -------------- | ---------------- |
|
|
381
383
|
| entry_belongs_account | **归属关系** | 分录归属科目 | JournalEntry | Account | 分录行对应科目 |
|
|
382
384
|
| entry_belongs_cost_center | **归属关系** | 分录归属成本中心 | JournalEntry | CostCenter | 分录行对应组织 |
|
|
@@ -407,7 +409,7 @@ s.tables.add_relationship(
|
|
|
407
409
|
|
|
408
410
|
### 6.1 函数清单
|
|
409
411
|
|
|
410
|
-
| 函数 ID |
|
|
412
|
+
| 函数 ID | **平台分类** | 功能 | 参数 |
|
|
411
413
|
| ---------------------------- | ------------ | ------------ | ------------------------------------------------------------------ |
|
|
412
414
|
| profit.fn.get_summary | **总览分析** | 利润总览 | start_date, end_date, cost_center_id(可选) |
|
|
413
415
|
| profit.fn.yoy_analysis | **趋势分析** | 同比分析 | start_date, end_date, pl_category(可选) |
|
|
@@ -517,22 +519,22 @@ s.tables.add_relationship(
|
|
|
517
519
|
| 12 | define_property(约 42 个) |
|
|
518
520
|
| 13 | define_link_type(10 种) |
|
|
519
521
|
| 14 | sync_metric_refs |
|
|
520
|
-
| 15 | **CATEGORY_REGISTRY** + `s.categories.apply_registry`(347 对齐) |
|
|
521
522
|
|
|
522
|
-
### 7.4
|
|
523
|
+
### 7.4 阶段四:灌数、函数与分类(中)
|
|
523
524
|
|
|
524
525
|
| 步骤 | 任务 |
|
|
525
526
|
| ---- | ---- |
|
|
526
|
-
| 15 |
|
|
527
|
-
| 16 | 7 个 profit_fn_*.py |
|
|
528
|
-
| 17 |
|
|
527
|
+
| 15 | seed 灌数:**dim_date** + 维表 + fact(写入 date_key) |
|
|
528
|
+
| 16 | 7 个 `profit_fn_*.py`:**publish --register-function-id** |
|
|
529
|
+
| 17 | `function run` + **`save-test-arguments`** |
|
|
530
|
+
| 18 | **`profit_category_mount.py`**:`CATEGORY_REGISTRY` + `apply_registry`(**最后**,类灌数) |
|
|
529
531
|
|
|
530
|
-
### 7.5
|
|
532
|
+
### 7.5 实施阶段参考(须 plans 已定稿后)
|
|
531
533
|
|
|
532
|
-
| 来源
|
|
533
|
-
|
|
|
534
|
-
| `资源/examples/onto/利润示例/` |
|
|
535
|
-
| [规划示例:产品销售](./规划示例_产品销售本体规划方案.md) |
|
|
534
|
+
| 来源 | 用途 | 注意 |
|
|
535
|
+
| ---- | ---- | ---- |
|
|
536
|
+
| `资源/examples/onto/利润示例/` | 对照 API 写法或复制后按 **本实现 plans** 改造 | **禁止**无 plans 直接复制 init |
|
|
537
|
+
| [规划示例:产品销售](./规划示例_产品销售本体规划方案.md) | 跨域工程模式只读对照 | 表结构与函数逻辑不同 |
|
|
536
538
|
|
|
537
539
|
**seed 数据建议**:
|
|
538
540
|
|
|
@@ -566,7 +568,7 @@ s.tables.add_relationship(
|
|
|
566
568
|
| **表间关系** | **8 条** |
|
|
567
569
|
| Cube | **5 个** + 派生度量 |
|
|
568
570
|
| 对象 | 6 种 + 分类;10 种链接 |
|
|
569
|
-
|
|
|
571
|
+
| **平台侧栏分类** | 侧栏分类名与附录 B 一致;`category_mount` 重跑幂等 |
|
|
570
572
|
| 函数 | get_summary、budget_vs_actual、account_breakdown 可运行 |
|
|
571
573
|
| 数据 | 种子灌入后预实差异可解释 |
|
|
572
574
|
|
|
@@ -586,13 +588,13 @@ s.tables.add_relationship(
|
|
|
586
588
|
|
|
587
589
|
---
|
|
588
590
|
|
|
589
|
-
## 附录 B
|
|
591
|
+
## 附录 B:平台分类挂载对照表(CATEGORY_REGISTRY)
|
|
590
592
|
|
|
591
|
-
与 `利润示例/setup/
|
|
593
|
+
与 `利润示例/setup/profit_category_mount.py` 顶部 **`CATEGORY_REGISTRY`** 一一对应(见 [本体分类规划与SDK扩展方案](./本体分类规划与SDK扩展方案.md))。**init 不含分类挂载**;本附录在 **全部函数 publish 后** 由 `category_mount` 脚本执行。
|
|
592
594
|
|
|
593
595
|
### B.1 物理表(table)
|
|
594
596
|
|
|
595
|
-
|
|
|
597
|
+
| 平台分类 | 表名 |
|
|
596
598
|
| -------- | ---- |
|
|
597
599
|
| 维度表 | dim_account, dim_cost_center |
|
|
598
600
|
| 事实表 | fact_gl_journal_entry, fact_budget_entry |
|
|
@@ -601,14 +603,14 @@ s.tables.add_relationship(
|
|
|
601
603
|
|
|
602
604
|
### B.2 Cube(cube)
|
|
603
605
|
|
|
604
|
-
|
|
|
606
|
+
| 平台分类 | Cube |
|
|
605
607
|
| -------- | ---- |
|
|
606
608
|
| 流程型 | ActualCube, BudgetCube |
|
|
607
609
|
| 主体型 | AccountActualCube, CostCenterActualCube, TimeActualCube |
|
|
608
610
|
|
|
609
611
|
### B.3 对象类型(object)
|
|
610
612
|
|
|
611
|
-
|
|
|
613
|
+
| 平台分类 | code |
|
|
612
614
|
| -------- | ---- |
|
|
613
615
|
| 主数据 | Account, CostCenter |
|
|
614
616
|
| 事务 | JournalEntry, BudgetLine |
|
|
@@ -616,7 +618,7 @@ s.tables.add_relationship(
|
|
|
616
618
|
|
|
617
619
|
### B.4 表间关系(relation)
|
|
618
620
|
|
|
619
|
-
|
|
|
621
|
+
| 平台分类 | 从表 → 到表 |
|
|
620
622
|
| -------- | ----------- |
|
|
621
623
|
| 时间关联 | fact_gl_journal_entry → dim_date;fact_budget_entry → dim_date |
|
|
622
624
|
| 主数据关联 | fact_gl_journal_entry → dim_account / dim_cost_center;fact_budget_entry → dim_account / dim_cost_center |
|
|
@@ -624,7 +626,7 @@ s.tables.add_relationship(
|
|
|
624
626
|
|
|
625
627
|
### B.5 链接类型(link)
|
|
626
628
|
|
|
627
|
-
|
|
|
629
|
+
| 平台分类 | link code |
|
|
628
630
|
| -------- | --------- |
|
|
629
631
|
| 归属关系 | entry_belongs_account, entry_belongs_cost_center, budget_for_account, budget_for_cost_center |
|
|
630
632
|
| 分析归因 | analysis_by_account, analysis_by_cost_center, account_contributes_profit, cost_center_contributes_profit |
|
|
@@ -633,9 +635,9 @@ s.tables.add_relationship(
|
|
|
633
635
|
|
|
634
636
|
### B.6 本体函数(function)
|
|
635
637
|
|
|
636
|
-
init
|
|
638
|
+
函数在 `functions/` 中 **publish 注册**;`profit_category_mount.py` 在 **init + seed + 全部函数 publish 之后** 统一 `apply_registry`(含 function 段,`skip_missing=True` 可重跑)。建议分类:
|
|
637
639
|
|
|
638
|
-
|
|
|
640
|
+
| 平台分类 | function_id |
|
|
639
641
|
| -------- | ----------- |
|
|
640
642
|
| 总览分析 | profit.fn.get_summary |
|
|
641
643
|
| 趋势分析 | profit.fn.yoy_analysis, profit.fn.mom_analysis |
|
|
@@ -658,7 +660,7 @@ init **不**注册函数;`apply_registry(..., skip_missing=True)` 跳过未发
|
|
|
658
660
|
| 4 | Cube 层 | ☑(**5 个**,§4.0) |
|
|
659
661
|
| 5 | 对象 + 分类 | ☑(§5.1、§5.4) |
|
|
660
662
|
| 6–10 | 同指南 | ☑ |
|
|
661
|
-
| 6a–6e |
|
|
663
|
+
| 6a–6e | 平台侧栏分类 | ☑(附录 B + `profit_category_mount.py`) |
|
|
662
664
|
|
|
663
665
|
---
|
|
664
666
|
|
|
@@ -670,11 +672,11 @@ init **不**注册函数;`apply_registry(..., skip_missing=True)` 跳过未发
|
|
|
670
672
|
| 本体规划指南 | [本体规划指南.md](./本体规划指南.md) |
|
|
671
673
|
| 规划示例(产品销售) | [规划示例_产品销售本体规划方案.md](./规划示例_产品销售本体规划方案.md) |
|
|
672
674
|
| **内置脚本示例** | `资源/examples/onto/利润示例/`(`dazi examples sync`;表名迁移中) |
|
|
673
|
-
|
|
|
675
|
+
| 分类方案 | [本体分类规划与 SDK 扩展方案](./本体分类规划与SDK扩展方案.md) |
|
|
674
676
|
|
|
675
677
|
---
|
|
676
678
|
|
|
677
|
-
**方案版本**:v2.
|
|
679
|
+
**方案版本**:v2.3(分类挂载迁至 `profit_category_mount.py`,类灌数)
|
|
678
680
|
**创建日期**:(定稿日)
|
|
679
681
|
**适用**:复制到 `<item-path>/plans/`;`<space-id>` 以该实现单元 `README.md` 为准
|
|
680
682
|
**状态**:规划示例(公共模板)
|
package/dist/examples/index.json
CHANGED