dosubot[bot] commented on issue #2822: URL: https://github.com/apache/incubator-hugegraph/issues/2822#issuecomment-3002989656
<!-- Answer --> 你遇到的 “Expect source vertex label” 报错,通常是因为批量创建边时,edgeList 里的边数据缺少或错误指定了 source-label(源点类型名)。在 HugeGraph 中,创建边时必须明确指定 source-label 和 target-label,这两个字段必须是顶点类型(VertexLabel)的名称,而不是主键(primaryKey)的值。如果 edgeList 里 source-label 或 target-label 填写成了主键值,或者漏掉了顶点类型名,就会出现这个报错。 建议你检查 edgeList 里每个边对象,确保包含 source-label、target-label(均为 VertexLabel 名称)、sourceId、targetId 以及 edge label。如果你的顶点 ID 策略是 PRIMARY_KEY,可以用主键值拼接出顶点 ID,但 source-label 依然必须是类型名。相关说明可参考[这里](https://github.com/apache/incubator-hugegraph/issues/2776)。 如果还有问题,建议补充一份 edgeList 的示例数据和相关 schema(VertexLabel、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/52c036a2-d7c2-4328-b3e1-713484b35d35?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/52c036a2-d7c2-4328-b3e1-713484b35d35?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/52c036a2-d7c2-4328-b3e1-713484b35d35?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/52c036a2-d7c2-4328-b3e1-713484b35d35?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/52c036a2-d7c2-4328-b3e1-713484b35d35?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/52c036a2-d7c2-4328-b3e1-713484b35d35?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/52c036a2-d7c2-4328-b3e1-713484b35d35?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [! [Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-hugegraph/issues/2822) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
