GitHub user dosubot[bot] edited a comment on the discussion: 关于电网拓扑数据导入
<!-- Answer --> edge_connected_to.csv 里的 source_label 和 target_label 两列,应该分别填写 from 和 to 对应顶点的 label(类型),而且必须和 schema.groovy 里定义的顶点 label 完全一致(区分大小写)。 举例:假设有一行 ``` id,from,to,label,source_label,target_label edge_2,XLD-3445,HWX-3087,CONNECTED_TO,LineSegment,StationHouse ``` 这里 XLD-3445 在 vertex_linesegment-1.csv 里,label 是 LineSegment;HWX-3087 在 vertex_stationhouse-1.csv 里,label 是 StationHouse,所以 source_label 填 LineSegment,target_label 填 StationHouse。 你可以用 Excel 或脚本批量查找 from/to 在各自顶点 CSV 里的 label,然后填到 source_label/target_label 列。只要这两列和 schema.groovy 里的顶点 label 完全一致,struct.json 的 value_mapping 就能正确筛选和导入所有关系,否则会被跳过但不会报错([官方文档说明](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/cn/docs/quickstart/toolchain/hugegraph-loader.md))。 导入后建议用 REST API 查询边类型和数量,确认关系是否齐全。如需自动化脚本或 Excel 公式思路可以随时补充需求。 <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fhugegraph).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fhugegraph). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fhugegraph#message_id=13ccfdcc-a9c1-4e00-9a50-6d0ba3ea8304) [](https://github.dosu.com/apache/hugegraph?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fhugegraph) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fhugegraph) GitHub link: https://github.com/apache/hugegraph/discussions/2917#discussioncomment-15204455 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
