写成`"from": "from", "to": "to"` 导入会报错呀 那你能根据我给你的数据和脚本
帮我写一份完整的导入配置吗
原始邮件
发件人:dosubot[bot] (via GitHub) <[email protected]>
发件时间:2025年12月11日 11:10
收件人:dev <[email protected]>
主题:Re: [D] 关于电网拓扑数据导入 [incubator-hugegraph]
GitHub user dosubot[bot] added a comment to the discussion: 关于电网拓扑数据导入
<!-- Answer -->
你的导入“无报错但部分设备没有连接关系”,根本原因是 struct_1.json 的 edges 配置 field_mapping 写成了 `"from": "id", "to": "id"`,而不是 `"from": "from", "to": "to"`。这样 loader 会把 edge CSV 的 id 列当作边属性导入,导致边无法正确关联顶点,或者被静默跳过,最终部分设备没有连接关系(如 BDZ-3002、XLD-3445、XLD-3380 等)。
**具体问题分析:**
1. **field_mapping 错误**:必须是 `"from": "from", "to": "to"`,否则 loader 取不到顶点主键 id,边全部失效。
2. **边标签 .properties() 必须声明实际用到的属性**,如有 source_label/target_label 就要写上,否则 loader 也会报错或跳过。
3. **CSV 文件有重复行**:如 vertex_linesegment-1.csv、vertex_stationhouse-1.csv 等有多行重复 id,会导致顶点覆盖或边关联异常。
4. **部分设备没有连接关系**:因为边数据和顶点数据的 id 不一致、重复、空行或 field_mapping 错误,导致边无法关联到这些设备。
**修正建议:**
### 1. schema_1.groovy(只保留必要属性,边标签声明 source_label/target_label)
```groovy
// 属性定义
schema.propertyKey("id").asText().ifNotExist().create();
schema.propertyKey("name").asText().ifNotExist().create();
schema.propertyKey("objectType").asText().ifNotExist().create();
schema.propertyKey("objectHandle").asText().ifNotExist().create();
schema.propertyKey("deviceType").asText().ifNotExist().create();
schema.propertyKey("internalEndpointNo").asInt().ifNotExist().create();
schema.propertyKey("terminalNo").asInt().ifNotExist().create();
schema.propertyKey("usage").asText().ifNotExist().create();
schema.propertyKey("powerFlowDirection").asInt().ifNotExist().create();
schema.propertyKey("belongSubstation").asText().ifNotExist().create();
schema.propertyKey("belongFeeder").asText().ifNotExist().create();
schema.propertyKey("source_label").asText().ifNotExist().create();
schema.propertyKey("target_label").asText().ifNotExist().create();
// 顶点标签
schema.vertexLabel("Substation").properties("id", "name", "objectType", "objectHandle", "deviceType", "internalEndpointNo", "terminalNo", "usage", "powerFlowDirection", "belongSubstation", "belongFeeder").primaryKeys("id").ifNotExist().create();
schema.vertexLabel("LineSegment").properties("id", "name", "objectType", "objectHandle", "deviceType", "internalEndpointNo", "terminalNo", "usage", "powerFlowDirection", "belongSubstation", "belongFeeder").primaryKeys("id").ifNotExist().create();
schema.vertexLabel("LineSwitch").properties("id", "name", "objectType", "objectHandle", "deviceType", "internalEndpointNo", "terminalNo", "usage", "powerFlowDirection", "belongSubstation", "belongFeeder").primaryKeys("id").ifNotExist().create();
schema.vertexLabel("StationHouse").properties("id", "name", "objectType", "objectHandle", "deviceType", "internalEndpointNo", "terminalNo", "usage", "powerFlowDirection", "belongSubstation", "belongFeeder").primaryKeys("id").ifNotExist().create();
// 边标签(每种类型对每种类型都定义一条边,便于扩展和双向连接)
schema.edgeLabel("Substation2LineSegment").sourceLabel("Substation").targetLabel("LineSegment").properties("source_label", "target_label").ifNotExist().create();
schema.edgeLabel("LineSegment2Substation").sourceLabel("LineSegment").targetLabel("Substation").properties("source_label", "target_label").ifNotExist().create();
schema.edgeLabel("LineSegment2StationHouse").sourceLabel("LineSegment").targetLabel("StationHouse").properties("source_label", "target_label").ifNotExist().create();
schema.edgeLabel("StationHouse2LineSegment").sourceLabel("StationHouse").targetLabel("LineSegment").properties("source_label", "target_label").ifNotExist().create();
schema.edgeLabel("LineSegment2LineSegment").sourceLabel("LineSegment").targetLabel("LineSegment").properties("source_label", "target_label").ifNotExist().create();
schema.edgeLabel("LineSegment2LineSwitch").sourceLabel("LineSegment").targetLabel("LineSwitch").properties("source_label", "target_label").ifNotExist().create();
schema.edgeLabel("LineSwitch2LineSegment").sourceLabel("LineSwitch").targetLabel("LineSegment").properties("source_label", "target_label").ifNotExist().create();
schema.edgeLabel("StationHouse2LineSwitch").sourceLabel("StationHouse").targetLabel("LineSwitch").properties("source_label", "target_label").ifNotExist().create();
schema.edgeLabel("LineSwitch2StationHouse").sourceLabel("LineSwitch").targetLabel("StationHouse").properties("source_label", "target_label").ifNotExist().create();
```
---
### 2. struct_1.json(edges 部分 field_mapping 必须为 from/to,且 value_mapping 精确过滤)
```json
{
"vertices": [
{
"label": "Substation",
"input": {
"type": "file",
"path": "vertex_substation-1.csv",
"format": "CSV",
"header": ["id", "name", "objectType", "objectHandle", "deviceType", "internalEndpointNo", "terminalNo", "usage", "powerFlowDirection", "belongSubstation", "belongFeeder"],
"charset": "UTF-8"
},
"null_values": ["NULL", "null"]
},
// 其他顶点类型同理
],
"edges": [
{
"label": "Substation2LineSegment",
"source": ["from"],
"target": ["to"],
"input": {
"type": "file",
"path": "power_edges_to.csv",
"format": "CSV",
"header": ["id", "from", "to", "label", "source_label", "target_label"]
},
"field_mapping": { "from": "from", "to": "to" },
"value_mapping": {
"label": { "CONNECTED_TO": "Substation2LineSegment" },
"source_label": { "Substation": "Substation" },
"target_label": { "LineSegment": "LineSegment" }
}
},
{
"label": "LineSegment2Substation",
"source": ["from"],
"target": ["to"],
"input": { "type": "file", "path": "power_edges_to.csv", "format": "CSV", "header": ["id", "from", "to", "label", "source_label", "target_label"] },
"field_mapping": { "from": "from", "to": "to" },
"value_mapping": {
"label": { "CONNECTED_TO": "LineSegment2Substation" },
"source_label": { "LineSegment": "LineSegment" },
"target_label": { "Substation": "Substation" }
}
},
// 其余边类型同理,确保每种类型的连接都写一段,且 value_mapping 精确过滤
// ...
]
}
```
---
### 3. 重点排查和修正建议
- **所有 vertex_xxx.csv、power_edges_to.csv 文件必须无重复行、无空行、无多余空格,id 唯一且和边数据完全一致。**
- **struct_1.json 的 edges 部分 field_mapping 必须全部为 { "from": "from", "to": "to" },不能有 id。**
- **每个 edgeLabel 的 value_mapping 必须精确过滤 label、source_label、target_label,且和 schema.groovy 的 sourceLabel/targetLabel 完全一致。**
- **如果某些设备没有连接关系,优先检查:**
- 该设备 id 是否在所有相关 vertex_xxx.csv 只出现一次且无空格。
- 该设备 id 是否在 power_edges_to.csv 的 from/to 列出现,且 source_label/target_label 正确。
- struct_1.json 是否有对应 edgeLabel 配置,且 value_mapping 正确。
- **如有重复顶点或边,建议先 deduplicate(去重)所有 CSV 文件。**
---
### 4. 边数量异常的原因
- 你的 power_edges_to.csv 里每条边正反都写了(A→B、B→A),且 struct.json 里每种 edgeLabel 又都配置了一遍,导致边数量比顶点多很多。只要数据无重复、配置无误,这不是问题。
---
### 5. 设备无连接关系的根本原因
- 99% 是因为 struct.json 的 field_mapping 写成了 { "from": "id", "to": "id" } 或 value_mapping 不精确,导致边被跳过或关联不到顶点。
- 还有可能是顶点 CSV 有重复、空行、主键不一致、隐藏字符等问题。
---
如需完整修正版 struct_1.json 和 schema_1.groovy,可以参考上面模板,按你的实际数据类型和连接关系补全所有 edgeLabel 和 value_mapping。只要严格按上述方式配置,所有设备的连接关系都能导入且无报错。
如还有具体设备无连接,建议贴出该设备在所有相关 CSV 的原始行和 struct.json 的对应 edgeLabel 配置,我可以帮你逐条定位。
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/b7a552ea-0e2a-47cf-8f3d-f821410f74fa?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b7a552ea-0e2a-47cf-8f3d-f821410f74fa?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b7a552ea-0e2a-47cf-8f3d-f821410f74fa?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b7a552ea-0e2a-47cf-8f3d-f821410f74fa?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b7a552ea-0e2a-47cf-8f3d-f821410f74fa?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b7a552ea-0e2a-47cf-8f3d-f821410f74fa?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b7a552ea-0e2a-47cf-8f3d-f821410f74fa?feedback_type=other)</sup>
[](https://app.dosu.dev/e5e246fa-a522-4d8a-ab3c-e2588b5b501b/ask?utm_source=github)&nbsp;[](https://cursor.com/link/prompt?text=%E4%BD%A0%E7%9A%84%E5%AF%BC%E5%85%A5%E2%80%9C%E6%97%A0%E6%8A%A5%E9%94%99%E4%BD%86%E9%83%A8%E5%88%86%E8%AE%BE%E5%A4%87%E6%B2%A1%E6%9C%89%E8%BF%9E%E6%8E%A5%E5%85%B3%E7%B3%BB%E2%80%9D%EF%BC%8C%E6%A0%B9%E6%9C%AC%E5%8E%9F%E5%9B%A0%E6%98%AF%20struct_1.json%20%E7%9A%84%20edges%20%E9%85%8D%E7%BD%AE%20field_mapping%20%E5%86%99%E6%88%90%E4%BA%86%20%60%22from%22%3A%20%22id%22%2C%20%22to%22%3A%20%22id%22%60%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%20%60%22from%22%3A%20%22from%22%2C%20%22to%22%3A%20%22to%22%60%E3%80%82%E8%BF%99%E6%A0%B7%20loader%20%E4%BC%9A%E6%8A%8A%20edge%20CSV%20%E7%9A%84%20id%20%E5%88%97%E5%BD%93%E4%BD%9C%E8%BE%B9%E5%B1%9E%E6%80%A7%E5%AF%BC%E5%85%A5%EF%BC%8C%E5%AF%BC%E8%87%B4%E8%BE%B9%E6%97%A0%E6%B3%95%E6%AD%A3%E7%A1%AE%E5%85%B3%E8%81%94%E9%A1%B6%E7
%82%B9%EF%BC%8C%E6%88%96%E8%80%85%E8%A2%AB%E9%9D%99%E9%BB%98%E8%B7%B3%E8%BF%87%EF%BC%8C%E6%9C%80%E7%BB%88%E9%83%A8%E5%88%86%E8%AE%BE%E5%A4%87%E6%B2%A1%E6%9C%89%E8%BF%9E%E6%8E%A5%E5%85%B3%E7%B3%BB%EF%BC%88%E5%A6%82%20BDZ-3002%E3%80%81XLD-3445%E3%80%81XLD-3380%20%E7%AD%89%EF%BC%89%E3%80%82%0A%0A%2A%2A%E5%85%B7%E4%BD%93%E9%97%AE%E9%A2%98%E5%88%86%E6%9E%90%EF%BC%9A%2A%2A%0A1.%20%2A%2Afield_mapping%20%E9%94%99%E8%AF%AF%2A%2A%EF%BC%9A%E5%BF%85%E9%A1%BB%E6%98%AF%20%60%22from%22%3A%20%22from%22%2C%20%22to%22%3A%20%22to%22%60%EF%BC%8C%E5%90%A6%E5%88%99%20loader%20%E5%8F%96%E4%B8%8D%E5%88%B0%E9%A1%B6%E7%82%B9%E4%B8%BB%E9%94%AE%20id%EF%BC%8C%E8%BE%B9%E5%85%A8%E9%83%A8%E5%A4%B1%E6%95%88%E3%80%82%0A2.%20%2A%2A%E8%BE%B9%E6%A0%87%E7%AD%BE%20.properties%28%29%20%E5%BF%85%E9%A1%BB%E5%A3%B0%E6%98%8E%E5%AE%9E%E9%99%85%E7%94%A8%E5%88%B0%E7%9A%84%E5%B1%9E%E6%80%A7%2A%2A%EF%BC%8C%E5%A6%82%E6%9C%89%20source_label/target_label%20%E5%B0%B1%E8%A6%81%E5%86%99%E4%B8%8A%EF%BC%8C%E5%90%A6%E5%88%99%20loader%20%E4
%B9%9F%E4%BC%9A%E6%8A%A5%E9%94%99%E6%88%96%E8%B7%B3%E8%BF%87%E3%80%82%0A3.%20%2A%2ACSV%20%E6%96%87%E4%BB%B6%E6%9C%89%E9%87%8D%E5%A4%8D%E8%A1%8C%2A%2A%EF%BC%9A%E5%A6%82%20vertex_linesegment-1.csv%E3%80%81vertex_stationhouse-1.csv%20%E7%AD%89%E6%9C%89%E5%A4%9A%E8%A1%8C%E9%87%8D%E5%A4%8D%20id%EF%BC%8C%E4%BC%9A%E5%AF%BC%E8%87%B4%E9%A1%B6%E7%82%B9%E8%A6%86%E7%9B%96%E6%88%96%E8%BE%B9%E5%85%B3%E8%81%94%E5%BC%82%E5%B8%B8%E3%80%82%0A4.%20%2A%2A%E9%83%A8%E5%88%86%E8%AE%BE%E5%A4%87%E6%B2%A1%E6%9C%89%E8%BF%9E%E6%8E%A5%E5%85%B3%E7%B3%BB%2A%2A%EF%BC%9A%E5%9B%A0%E4%B8%BA%E8%BE%B9%E6%95%B0%E6%8D%AE%E5%92%8C%E9%A1%B6%E7%82%B9%E6%95%B0%E6%8D%AE%E7%9A%84%20id%20%E4%B8%8D%E4%B8%80%E8%87%B4%E3%80%81%E9%87%8D%E5%A4%8D%E3%80%81%E7%A9%BA%E8%A1%8C%E6%88%96%20field_mapping%20%E9%94%99%E8%AF%AF%EF%BC%8C%E5%AF%BC%E8%87%B4%E8%BE%B9%E6%97%A0%E6%B3%95%E5%85%B3%E8%81%94%E5%88%B0%E8%BF%99%E4%BA%9B%E8%AE%BE%E5%A4%87%E3%80%82%0A%0A%2A%2A%E4%BF%AE%E6%AD%A3%E5%BB%BA%E8%AE%AE%EF%BC%9A%2A%2A%0A%0A%23%23%23%201.%20schema_
1.groovy%EF%BC%88%E5%8F%AA%E4%BF%9D%E7%95%99%E5%BF%85%E8%A6%81%E5%B1%9E%E6%80%A7%EF%BC%8C%E8%BE%B9%E6%A0%87%E7%AD%BE%E5%A3%B0%E6%98%8E%20source_label/target_label%EF%BC%89%0A%0A%60%60%60groovy%0A//%20%E5%B1%9E%E6%80%A7%E5%AE%9A%E4%B9%89%0Aschema.propertyKey%28%22id%22%29.asText%28%29.ifNotExist%28%29.create%28%29%3B%0Aschema.propertyKey%28%22name%22%29.asText%28%29.ifNotExist%28%29.create%28%29%3B%0Aschema.propertyKey%28%22objectType%22%29.asText%28%29.ifNotExist%28%29.create%28%29%3B%0Aschema.propertyKey%28%22objectHandle%22%29.asText%28%29.ifNotExist%28%29.create%28%29%3B%0Aschema.propertyKey%28%22deviceType%22%29.asText%28%29.ifNotExist%28%29.create%28%29%3B%0Aschema.propertyKey%28%22internalEndpointNo%22%29.asInt%28%29.ifNotExist%28%29.create%28%29%3B%0Aschema.propertyKey%28%22terminalNo%22%29.asInt%28%29.ifNotExist%28%29.create%28%29%3B%0Aschema.propertyKey%28%22usage%22%29.asText%28%29.ifNotExist%28%29.create%28%29%3B%0Aschema.propertyKey%28%22powerFlowDirection%22%29.asInt%28
%29.ifNotExist%28%29.create%28%29%3B%0Aschema.propertyKey%28%22belongSubstation%22%29.asText%28%29.ifNotExist%28%29.create%28%29%3B%0Aschema.propertyKey%28%22belongFeeder%22%29.asText%28%29.ifNotExist%28%29.create%28%29%3B%0Aschema.propertyKey%28%22source_label%22%29.asText%28%29.ifNotExist%28%29.create%28%29%3B%0Aschema.propertyKey%28%22target_label%22%29.asText%28%29.ifNotExist%28%29.create%28%29%3B%0A%0A//%20%E9%A1%B6%E7%82%B9%E6%A0%87%E7%AD%BE%0Aschema.vertexLabel%28%22Substation%22%29.properties%28%22id%22%2C%20%22name%22%2C%20%22objectType%22%2C%20%22objectHandle%22%2C%20%22deviceType%22%2C%20%22internalEndpointNo%22%2C%20%22terminalNo%22%2C%20%22usage%22%2C%20%22powerFlowDirection%22%2C%20%22belongSubstation%22%2C%20%22belongFeeder%22%29.primaryKeys%28%22id%22%29.ifNotExist%28%29.create%28%29%3B%0Aschema.vertexLabel%28%22LineSegment%22%29.properties%28%22id%22%2C%20%22name%22%2C%20%22objectType%22%2C%20%22objectHandle%22%2C%20%22deviceType%22%2C%20%22internalEndpointNo%22%2C%
20%22terminalNo%22%2C%20%22usage%22%2C%20%22powerFlowDirection%22%2C%20%22belongSubstation%22%2C%20%22belongFeeder%22%29.primaryKeys%28%22id%22%29.ifNotExist%28%29.create%28%29%3B%0Aschema.vertexLabel%28%22LineSwitch%22%29.properties%28%22id%22%2C%20%22name%22%2C%20%22objectType%22%2C%20%22objectHandle%22%2C%20%22deviceType%22%2C%20%22internalEndpointNo%22%2C%20%22terminalNo%22%2C%20%22usage%22%2C%20%22powerFlowDirection%22%2C%20%22belongSubstation%22%2C%20%22belongFeeder%22%29.primaryKeys%28%22id%22%29.ifNotExist%28%29.create%28%29%3B%0Aschema.vertexLabel%28%22StationHouse%22%29.properties%28%22id%22%2C%20%22name%22%2C%20%22objectType%22%2C%20%22objectHandle%22%2C%20%22deviceType%22%2C%20%22internalEndpointNo%22%2C%20%22terminalNo%22%2C%20%22usage%22%2C%20%22powerFlowDirection%22%2C%20%22belongSubstation%22%2C%20%22belongFeeder%22%29.primaryKeys%28%22id%22%29.ifNotExist%28%29.create%28%29%3B%0A%0A//%20%E8%BE%B9%E6%A0%87%E7%AD%BE%EF%BC%88%E6%AF%8F%E7%A7%8D%E7%B1%BB%E5%9E%8B%E5%AF%B9
%E6%AF%8F%E7%A7%8D%E7%B1%BB%E5%9E%8B%E9%83%BD%E5%AE%9A%E4%B9%89%E4%B8%80%E6%9D%A1%E8%BE%B9%EF%BC%8C%E4%BE%BF%E4%BA%8E%E6%89%A9%E5%B1%95%E5%92%8C%E5%8F%8C%E5%90%91%E8%BF%9E%E6%8E%A5%EF%BC%89%0Aschema.edgeLabel%28%22Substation2LineSegment%22%29.sourceLabel%28%22Substation%22%29.targetLabel%28%22LineSegment%22%29.properties%28%22source_label%22%2C%20%22target_label%22%29.ifNotExist%28%29.create%28%29%3B%0Aschema.edgeLabel%28%22LineSegment2Substation%22%29.sourceLabel%28%22LineSegment%22%29.targetLabel%28%22Substation%22%29.properties%28%22source_label%22%2C%20%22target_label%22%29.ifNotExist%28%29.create%28%29%3B%0Aschema.edgeLabel%28%22LineSegment2StationHouse%22%29.sourceLabel%28%22LineSegment%22%29.targetLabel%28%22StationHouse%22%29.properties%28%22source_label%22%2C%20%22target_label%22%29.ifNotExist%28%29.create%28%29%3B%0Aschema.edgeLabel%28%22StationHouse2LineSegment%22%29.sourceLabel%28%22StationHouse%22%29.targetLabel%28%22LineSegment%22%29.properties%28%22source_label%22%2C%
20%22target_label%22%29.ifNotExist%28%29.create%28%29%3B%0Aschema.edgeLabel%28%22LineSegment2LineSegment%22%29.sourceLabel%28%22LineSegment%22%29.targetLabel%28%22LineSegment%22%29.properties%28%22source_label%22%2C%20%22target_label%22%29.ifNotExist%28%29.create%28%29%3B%0Aschema.edgeLabel%28%22LineSegment2LineSwitch%22%29.sourceLabel%28%22LineSegment%22%29.targetLabel%28%22LineSwitch%22%29.properties%28%22source_label%22%2C%20%22target_label%22%29.ifNotExist%28%29.create%28%29%3B%0Aschema.edgeLabel%28%22LineSwitch2LineSegment%22%29.sourceLabel%28%22LineSwitch%22%29.targetLabel%28%22LineSegment%22%29.properties%28%22source_label%22%2C%20%22target_label%22%29.ifNotExist%28%29.create%28%29%3B%0Aschema.edgeLabel%28%22StationHouse2LineSwitch%22%29.sourceLabel%28%22StationHouse%22%29.targetLabel%28%22LineSwitch%22%29.properties%28%22source_label%22%2C%20%22target_label%22%29.ifNotExist%28%29.create%28%29%3B%0Aschema.edgeLabel%28%22LineSwitch2StationHouse%22%29.sourceLabel%28%22LineSwitc
h%22%29.targetLabel%28%22StationHouse%22%29.properties%28%22source_label%22%2C%20%22target_label%22%29.ifNotExist%28%29.create%28%29%3B%0A%60%60%60%0A%0A---%0A%0A%23%23%23%202.%20struct_1.json%EF%BC%88edges%20%E9%83%A8%E5%88%86%20field_mapping%20%E5%BF%85%E9%A1%BB%E4%B8%BA%20from/to%EF%BC%8C%E4%B8%94%20value_mapping%20%E7%B2%BE%E7%A1%AE%E8%BF%87%E6%BB%A4%EF%BC%89%0A%0A%60%60%60json%0A%7B%0A%20%20%22vertices%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22label%22%3A%20%22Substation%22%2C%0A%20%20%20%20%20%20%22input%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22file%22%2C%0A%20%20%20%20%20%20%20%20%22path%22%3A%20%22vertex_substation-1.csv%22%2C%0A%20%20%20%20%20%20%20%20%22format%22%3A%20%22CSV%22%2C%0A%20%20%20%20%20%20%20%20%22header%22%3A%20%5B%22id%22%2C%20%22name%22%2C%20%22objectType%22%2C%20%22objectHandle%22%2C%20%22deviceType%22%2C%20%22internalEndpointNo%22%2C%20%22terminalNo%22%2C%20%22usage%22%2C%20%22powerFlowDirection%22%2C%20%22belongSubstation%22%2C%
20%22belongFeeder%22%5D%2C%0A%20%20%20%20%20%20%20%20%22charset%22%3A%20%22UTF-8%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22null_values%22%3A%20%5B%22NULL%22%2C%20%22null%22%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%20//%20%E5%85%B6%E4%BB%96%E9%A1%B6%E7%82%B9%E7%B1%BB%E5%9E%8B%E5%90%8C%E7%90%86%0A%20%20%5D%2C%0A%20%20%22edges%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22label%22%3A%20%22Substation2LineSegment%22%2C%0A%20%20%20%20%20%20%22source%22%3A%20%5B%22from%22%5D%2C%0A%20%20%20%20%20%20%22target%22%3A%20%5B%22to%22%5D%2C%0A%20%20%20%20%20%20%22input%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22file%22%2C%0A%20%20%20%20%20%20%20%20%22path%22%3A%20%22power_edges_to.csv%22%2C%0A%20%20%20%20%20%20%20%20%22format%22%3A%20%22CSV%22%2C%0A%20%20%20%20%20%20%20%20%22header%22%3A%20%5B%22id%22%2C%20%22from%22%2C%20%22to%22%2C%20%22label%22%2C%20%22source_label%22%2C%20%22target_label%22%5D%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22field_mapping%22%3A%20%7
B%20%22from%22%3A%20%22from%22%2C%20%22to%22%3A%20%22to%22%20%7D%2C%0A%20%20%20%20%20%20%22value_mapping%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22label%22%3A%20%7B%20%22CONNECTED_TO%22%3A%20%22Substation2LineSegment%22%20%7D%2C%0A%20%20%20%20%20%20%20%20%22source_label%22%3A%20%7B%20%22Substation%22%3A%20%22Substation%22%20%7D%2C%0A%20%20%20%20%20%20%20%20%22target_label%22%3A%20%7B%20%22LineSegment%22%3A%20%22LineSegment%22%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22label%22%3A%20%22LineSegment2Substation%22%2C%0A%20%20%20%20%20%20%22source%22%3A%20%5B%22from%22%5D%2C%0A%20%20%20%20%20%20%22target%22%3A%20%5B%22to%22%5D%2C%0A%20%20%20%20%20%20%22input%22%3A%20%7B%20%22type%22%3A%20%22file%22%2C%20%22path%22%3A%20%22power_edges_to.csv%22%2C%20%22format%22%3A%20%22CSV%22%2C%20%22header%22%3A%20%5B%22id%22%2C%20%22from%22%2C%20%22to%22%2C%20%22label%22%2C%20%22source_label%22%2C%20%22target_label%22%5D%20%7D%2C%0A%20%20%20%20%20%20%22fi
eld_mapping%22%3A%20%7B%20%22from%22%3A%20%22from%22%2C%20%22to%22%3A%20%22to%22%20%7D%2C%0A%20%20%20%20%20%20%22value_mapping%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22label%22%3A%20%7B%20%22CONNECTED_TO%22%3A%20%22LineSegment2Substation%22%20%7D%2C%0A%20%20%20%20%20%20%20%20%22source_label%22%3A%20%7B%20%22LineSegment%22%3A%20%22LineSegment%22%20%7D%2C%0A%20%20%20%20%20%20%20%20%22target_label%22%3A%20%7B%20%22Substation%22%3A%20%22Substation%22%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20//%20%E5%85%B6%E4%BD%99%E8%BE%B9%E7%B1%BB%E5%9E%8B%E5%90%8C%E7%90%86%EF%BC%8C%E7%A1%AE%E4%BF%9D%E6%AF%8F%E7%A7%8D%E7%B1%BB%E5%9E%8B%E7%9A%84%E8%BF%9E%E6%8E%A5%E9%83%BD%E5%86%99%E4%B8%80%E6%AE%B5%EF%BC%8C%E4%B8%94%20value_mapping%20%E7%B2%BE%E7%A1%AE%E8%BF%87%E6%BB%A4%0A%20%20%20%20//%20...%0A%20%20%5D%0A%7D%0A%60%60%60%0A%0A---%0A%0A%23%23%23%203.%20%E9%87%8D%E7%82%B9%E6%8E%92%E6%9F%A5%E5%92%8C%E4%BF%AE%E6%AD%A3%E5%BB%BA%E8%AE%AE%0A%0A-%20%2A%2A%E6%89%80%E6%9C%89%20vertex_xxx.
csv%E3%80%81power_edges_to.csv%20%E6%96%87%E4%BB%B6%E5%BF%85%E9%A1%BB%E6%97%A0%E9%87%8D%E5%A4%8D%E8%A1%8C%E3%80%81%E6%97%A0%E7%A9%BA%E8%A1%8C%E3%80%81%E6%97%A0%E5%A4%9A%E4%BD%99%E7%A9%BA%E6%A0%BC%EF%BC%8Cid%20%E5%94%AF%E4%B8%80%E4%B8%94%E5%92%8C%E8%BE%B9%E6%95%B0%E6%8D%AE%E5%AE%8C%E5%85%A8%E4%B8%80%E8%87%B4%E3%80%82%2A%2A%0A-%20%2A%2Astruct_1.json%20%E7%9A%84%20edges%20%E9%83%A8%E5%88%86%20field_mapping%20%E5%BF%85%E9%A1%BB%E5%85%A8%E9%83%A8%E4%B8%BA%20%7B%20%22from%22%3A%20%22from%22%2C%20%22to%22%3A%20%22to%22%20%7D%EF%BC%8C%E4%B8%8D%E8%83%BD%E6%9C%89%20id%E3%80%82%2A%2A%0A-%20%2A%2A%E6%AF%8F%E4%B8%AA%20edgeLabel%20%E7%9A%84%20value_mapping%20%E5%BF%85%E9%A1%BB%E7%B2%BE%E7%A1%AE%E8%BF%87%E6%BB%A4%20label%E3%80%81source_label%E3%80%81target_label%EF%BC%8C%E4%B8%94%E5%92%8C%20schema.groovy%20%E7%9A%84%20sourceLabel/targetLabel%20%E5%AE%8C%E5%85%A8%E4%B8%80%E8%87%B4%E3%80%82%2A%2A%0A-%20%2A%2A%E5%A6%82%E6%9E%9C%E6%9F%90%E4%BA%9B%E8%AE%BE%E5%A4%87%E6%B2%A1%E6%9C%89%E8%BF%9E%E6%8E%A5%E
5%85%B3%E7%B3%BB%EF%BC%8C%E4%BC%98%E5%85%88%E6%A3%80%E6%9F%A5%EF%BC%9A%2A%2A%0A%20%20-%20%E8%AF%A5%E8%AE%BE%E5%A4%87%20id%20%E6%98%AF%E5%90%A6%E5%9C%A8%E6%89%80%E6%9C%89%E7%9B%B8%E5%85%B3%20vertex_xxx.csv%20%E5%8F%AA%E5%87%BA%E7%8E%B0%E4%B8%80%E6%AC%A1%E4%B8%94%E6%97%A0%E7%A9%BA%E6%A0%BC%E3%80%82%0A%20%20-%20%E8%AF%A5%E8%AE%BE%E5%A4%87%20id%20%E6%98%AF%E5%90%A6%E5%9C%A8%20power_edges_to.csv%20%E7%9A%84%20from/to%20%E5%88%97%E5%87%BA%E7%8E%B0%EF%BC%8C%E4%B8%94%20source_label/target_label%20%E6%AD%A3%E7%A1%AE%E3%80%82%0A%20%20-%20struct_1.json%20%E6%98%AF%E5%90%A6%E6%9C%89%E5%AF%B9%E5%BA%94%20edgeLabel%20%E9%85%8D%E7%BD%AE%EF%BC%8C%E4%B8%94%20value_mapping%20%E6%AD%A3%E7%A1%AE%E3%80%82%0A-%20%2A%2A%E5%A6%82%E6%9C%89%E9%87%8D%E5%A4%8D%E9%A1%B6%E7%82%B9%E6%88%96%E8%BE%B9%EF%BC%8C%E5%BB%BA%E8%AE%AE%E5%85%88%20deduplicate%EF%BC%88%E5%8E%BB%E9%87%8D%EF%BC%89%E6%89%80%E6%9C%89%20CSV%20%E6%96%87%E4%BB%B6%E3%80%82%2A%2A%0A%0A---%0A%0A%23%23%23%204.%20%E8%BE%B9%E6%95%B0%E9%87%8F%E5%BC%82%E5%B8
%B8%E7%9A%84%E5%8E%9F%E5%9B%A0%0A%0A-%20%E4%BD%A0%E7%9A%84%20power_edges_to.csv%20%E9%87%8C%E6%AF%8F%E6%9D%A1%E8%BE%B9%E6%AD%A3%E5%8F%8D%E9%83%BD%E5%86%99%E4%BA%86%EF%BC%88A%E2%86%92B%E3%80%81B%E2%86%92A%EF%BC%89%EF%BC%8C%E4%B8%94%20struct.json%20%E9%87%8C%E6%AF%8F%E7%A7%8D%20edgeLabel%20%E5%8F%88%E9%83%BD%E9%85%8D%E7%BD%AE%E4%BA%86%E4%B8%80%E9%81%8D%EF%BC%8C%E5%AF%BC%E8%87%B4%E8%BE%B9%E6%95%B0%E9%87%8F%E6%AF%94%E9%A1%B6%E7%82%B9%E5%A4%9A%E5%BE%88%E5%A4%9A%E3%80%82%E5%8F%AA%E8%A6%81%E6%95%B0%E6%8D%AE%E6%97%A0%E9%87%8D%E5%A4%8D%E3%80%81%E9%85%8D%E7%BD%AE%E6%97%A0%E8%AF%AF%EF%BC%8C%E8%BF%99%E4%B8%8D%E6%98%AF%E9%97%AE%E9%A2%98%E3%80%82%0A%0A---%0A%0A%23%23%23%205.%20%E8%AE%BE%E5%A4%87%E6%97%A0%E8%BF%9E%E6%8E%A5%E5%85%B3%E7%B3%BB%E7%9A%84%E6%A0%B9%E6%9C%AC%E5%8E%9F%E5%9B%A0%0A%0A-%2099%25%20%E6%98%AF%E5%9B%A0%E4%B8%BA%20struct.json%20%E7%9A%84%20field_mapping%20%E5%86%99%E6%88%90%E4%BA%86%20%7B%20%22from%22%3A%20%22id%22%2C%20%22to%22%3A%20%22id%22%20%7D%20%E6%88%96%20value_mapping%20%E
4%B8%8D%E7%B2%BE%E7%A1%AE%EF%BC%8C%E5%AF%BC%E8%87%B4%E8%BE%B9%E8%A2%AB%E8%B7%B3%E8%BF%87%E6%88%96%E5%85%B3%E8%81%94%E4%B8%8D%E5%88%B0%E9%A1%B6%E7%82%B9%E3%80%82%0A-%20%E8%BF%98%E6%9C%89%E5%8F%AF%E8%83%BD%E6%98%AF%E9%A1%B6%E7%82%B9%20CSV%20%E6%9C%89%E9%87%8D%E5%A4%8D%E3%80%81%E7%A9%BA%E8%A1%8C%E3%80%81%E4%B8%BB%E9%94%AE%E4%B8%8D%E4%B8%80%E8%87%B4%E3%80%81%E9%9A%90%E8%97%8F%E5%AD%97%E7%AC%A6%E7%AD%89%E9%97%AE%E9%A2%98%E3%80%82%0A%0A---%0A%0A%E5%A6%82%E9%9C%80%E5%AE%8C%E6%95%B4%E4%BF%AE%E6%AD%A3%E7%89%88%20struct_1.json%20%E5%92%8C%20schema_1.groovy%EF%BC%8C%E5%8F%AF%E4%BB%A5%E5%8F%82%E8%80%83%E4%B8%8A%E9%9D%A2%E6%A8%A1%E6%9D%BF%EF%BC%8C%E6%8C%89%E4%BD%A0%E7%9A%84%E5%AE%9E%E9%99%85%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E5%92%8C%E8%BF%9E%E6%8E%A5%E5%85%B3%E7%B3%BB%E8%A1%A5%E5%85%A8%E6%89%80%E6%9C%89%20edgeLabel%20%E5%92%8C%20value_mapping%E3%80%82%E5%8F%AA%E8%A6%81%E4%B8%A5%E6%A0%BC%E6%8C%89%E4%B8%8A%E8%BF%B0%E6%96%B9%E5%BC%8F%E9%85%8D%E7%BD%AE%EF%BC%8C%E6%89%80%E6%9C%89%E8%AE%BE%E5%A4%87
%E7%9A%84%E8%BF%9E%E6%8E%A5%E5%85%B3%E7%B3%BB%E9%83%BD%E8%83%BD%E5%AF%BC%E5%85%A5%E4%B8%94%E6%97%A0%E6%8A%A5%E9%94%99%E3%80%82%0A%0A%E5%A6%82%E8%BF%98%E6%9C%89%E5%85%B7%E4%BD%93%E8%AE%BE%E5%A4%87%E6%97%A0%E8%BF%9E%E6%8E%A5%EF%BC%8C%E5%BB%BA%E8%AE%AE%E8%B4%B4%E5%87%BA%E8%AF%A5%E8%AE%BE%E5%A4%87%E5%9C%A8%E6%89%80%E6%9C%89%E7%9B%B8%E5%85%B3%20CSV%20%E7%9A%84%E5%8E%9F%E5%A7%8B%E8%A1%8C%E5%92%8C%20struct.json%20%E7%9A%84%E5%AF%B9%E5%BA%94%20edgeLabel%20%E9%85%8D%E7%BD%AE%EF%BC%8C%E6%88%91%E5%8F%AF%E4%BB%A5%E5%B8%AE%E4%BD%A0%E9%80%90%E6%9D%A1%E5%AE%9A%E4%BD%8D%E3%80%82)&nbsp;[](https://go.dosu.dev/discord-bot)&nbsp;[](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-hugegraph/discussions/2917)
GitHub link: https://github.com/apache/incubator-hugegraph/discussions/2917#discussioncomment-15226200
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]