GitHub user dosubot[bot] edited a comment on the discussion: 关于电网拓扑数据导入
<!-- Answer --> Neo4j 和 HugeGraph 在 schema 和数据导入方式上有不少差异,尤其是边标签(EdgeLabel)和主键(primary key)映射。HugeGraph 导入失败最常见的原因是 struct.json 里边的 source/target 字段没有正确映射到顶点的主键字段,或者这些字段没有包含在 selected 列表里,导致边无法关联到顶点(即使顶点已经导入成功)[参考](https://github.com/apache/incubator-hugegraph/issues/2749)。 建议你把 schema.groovy、struct.json 和几行典型的电网数据(顶点和边)发出来,我可以帮你逐条检查映射和格式,定位问题。也可以把报错日志贴出来,能更快找到原因。 导入前可以先确认: - schema.groovy 里每个顶点定义了主键,边标签只连接一种源/目标类型 - struct.json 里边的 source/target 字段要和顶点主键一一对应,并且都在 selected 里 - 数据文件里顶点和边的 label、主键字段和 schema 完全一致 如果你需要 struct.json 或 schema.groovy 的参考模板,也可以直接说你的数据结构,我可以帮你写一份适配 HugeGraph 的导入配置。 <!-- 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).* --- Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-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=static-docs-feedback&utm_term=apache%2Fhugegraph#message_id=494d316c-76f8-4ce9-a795-fded751d60f9) [](https://github.dosu.com/apache/hugegraph?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-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=static-docs-share-team&utm_term=apache%2Fhugegraph) GitHub link: https://github.com/apache/hugegraph/discussions/2917#discussioncomment-15192525 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
