docs+deploy: 元数据同步工作流 v2.1(规格缓存/固定清单/force全表)与治理链路文档

This commit is contained in:
admin committed 2026-11-24 23:22:18 +08:00
1 parent 880fad1f36
commit 9ae77528f5
37 files changed
+135 -34

No files matched your search

+10
View File
@@ -44,6 +44,16 @@ docker compose down -v # 停止并清空数据(下次启动
- **主数据**:供应商/客户/SKU 的编码唯一、启用/停用/作废治理,禁止物理删除被引用记录;别名映射(`mdm_alias_mapping`)
- **治理稽核**:8 条质量规则在线稽核(同 `dq_check.py`)、库表元数据浏览、敏感字段脱敏
## 治理链路(已接入 Dify + DataHub + Gitea)
本 demo 通过 Dify 工作流「ERP→DataHub 元数据同步」把库表元数据与治理底稿编织进 DataHub:
- 数据流:`ERP /api/governance/tables` + `Gitea docs/` → LLM 生成治理规格 → DataHub(5 业务域 / 10 术语 / 7 标签 / 10 数据集含字段注释)
- 幂等:全局哈希无变化 → 秒级跳过;仅表变更 → 只重写该表并复用缓存规格(不调 LLM);`force=true` → 全量重建且按名/按 key 去重不产生重复实体
- 同步状态快照:`05_sync/erp_datahub_state.json`(由工作流自动提交到本仓库,git 历史即同步审计)
- 手动触发:`curl -X POST http://localhost:8088/v1/workflows/run -H "Authorization: Bearer app-GLYzB9EbAKvcXX9BLV1GxMX3" -H "Content-Type: application/json" -d '{"inputs":{"force":""},"response_mode":"blocking","user":"cli"}'`
- 编排 DSL 可复现:`node deploy/gen_workflow_draft.js`,Dify 应用 ID `1c71bc56-eab9-4029-b5cd-90fbd169c0bb`
## 文档索引(治理权威底稿)
| 文档 | 内容 |