coolboywcm commented on issue #680: URL: https://github.com/apache/incubator-hugegraph-toolchain/issues/680#issuecomment-3219452951
执行导入命令时提示id为空, 我的struct.json内容 ``` { "vertices": [ { "label": "实体", "input": { "charset": "UTF-8", "format": "CSV", "type": "file", "path": "csv_file/vertex.csv", "header": [ "id", "名称" ] }, "id": "id" } ], "edges": [ { "label": "显G卡芯片", "source": [ "source_id" ], "target": [ "target_id" ], "input": { "charset": "UTF-8", "format": "CSV", "type": "file", "path": "csv_file/edge.csv", "delimiter": ",", "header": [ "source_id", "target_id", "edge_type" ] }, "field_mapping": { "target_id": "id", "source_id": "id", "edge_type": "edge_type" } }, { "label": "中心简介", "source": [ "source_id" ], "target": [ "target_id" ], "input": { "charset": "UTF-8", "format": "CSV", "type": "file", "path": "csv_file/edge.csv", "delimiter": ",", "header": [ "source_id", "target_id", "edge_type" ] }, "field_mapping": { "target_id": "id", "source_id": "id", "edge_type": "edge_type" } } ] } ``` csv_file/vertex.csv文件内容 ``` id,名称 -201035082963479683,实体 -1779678833482502384,值 4646408208538057683,胶饴 -1861609733419239066,别名: 饴糖、畅糖、畅、软糖。 -2047289935702608120,词条 5842706712819643509,词条(拼音:cí tiáo)也叫词目,是辞书学用语,指收列的词语及其释文。 -3063129772935425027,文化 -2484942249444426630,红色食品 -3877061284769534378,红色食品是指食品为红色、橙红色或棕红色的食品。 ``` csv_file/edge.csv文件内容 ``` -201035082963479683,-1779678833482502384,属性 4646408208538057683,-1861609733419239066,描述 -2047289935702608120,5842706712819643509,描述 -2047289935702608120,-3063129772935425027,标签 -2484942249444426630,-3877061284769534378,描述 -2484942249444426630,-2484942249444426630,中文名 -2484942249444426630,-3402450096279275143,是否含防腐剂 -2484942249444426630,4786182067583989997,主要食用功效 -2484942249444426630,-8978611301755314833,适宜人群 -2484942249444426630,-382812815618074210,用途 ``` 运行命令 ` sh bin/hugegraph-loader.sh -g hugegraph_prod -f csv_file/struct.json -h xxx.xxx.x.x -p 9080 --batch-insert-threads 8 --test-mode true` 报错内容 ``` SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/loader/lib/log4j-slf4j-impl-2.18.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/loader/lib/apache-hugegraph-loader-incubating-1.5.0-shaded.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/loader/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. >> HugeGraphLoader worked in NORMAL MODE vertices/edges loaded this time : 1500/0 Failed to load, cause: The vertex id field can't be null Exception in thread "main" org.apache.hugegraph.loader.exception.ParseException: The vertex id field can't be null at org.apache.hugegraph.loader.task.ParseTaskBuilder.lambda$buildTask$0(ParseTaskBuilder.java:119) at org.apache.hugegraph.loader.task.ParseTaskBuilder$ParseTask.get(ParseTaskBuilder.java:158) at org.apache.hugegraph.loader.HugeGraphLoader.executeParseTask(HugeGraphLoader.java:289) at org.apache.hugegraph.loader.HugeGraphLoader.loadStruct(HugeGraphLoader.java:263) at org.apache.hugegraph.loader.HugeGraphLoader.loadStructs(HugeGraphLoader.java:217) at org.apache.hugegraph.loader.HugeGraphLoader.loadInputs(HugeGraphLoader.java:199) at org.apache.hugegraph.loader.HugeGraphLoader.loadInputs(HugeGraphLoader.java:171) at org.apache.hugegraph.loader.HugeGraphLoader.load(HugeGraphLoader.java:108) at org.apache.hugegraph.loader.HugeGraphLoader.main(HugeGraphLoader.java:71) Caused by: java.lang.IllegalArgumentException: The vertex id field can't be null at com.google.common.base.Preconditions.checkArgument(Preconditions.java:164) at org.apache.hugegraph.util.E.checkArgumentNotNull(E.java:58) at org.apache.hugegraph.loader.builder.ElementBuilder.customizeId(ElementBuilder.java:196) at org.apache.hugegraph.loader.builder.ElementBuilder.access$100(ElementBuilder.java:59) at org.apache.hugegraph.loader.builder.ElementBuilder$VertexIdKVPairs.buildVertices(ElementBuilder.java:371) at org.apache.hugegraph.loader.builder.VertexBuilder.build(VertexBuilder.java:59) at org.apache.hugegraph.loader.task.ParseTaskBuilder.lambda$buildTask$0(ParseTaskBuilder.java:96) ... 8 more ``` [@dosu](https://go.dosu.dev/dosubot). @Thespica -- 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: issues-unsubscr...@hugegraph.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@hugegraph.apache.org For additional commands, e-mail: issues-h...@hugegraph.apache.org