Thespica commented on issue #680:
URL: 
https://github.com/apache/incubator-hugegraph-toolchain/issues/680#issuecomment-3219859276

   > 如何跳过异常的数据,比如csv里面有些带特殊符号的数据, 我通过代码扫描创建边label时, 跳过了 但是 写入边数据时,对应的边类型就不存在了, 
这样的异常报错会导致这个导入进程停止 报错日志:
   > 
   > ```
   > Failed to load, cause: The edge label 'C#' doesn't exist
   > Exception in thread "main" 
org.apache.hugegraph.loader.exception.LoadException: The edge label 'C#' 
doesn't exist
   >         at 
org.apache.hugegraph.loader.builder.SchemaCache.getEdgeLabel(SchemaCache.java:119)
   >         at 
org.apache.hugegraph.loader.builder.ElementBuilder.getEdgeLabel(ElementBuilder.java:183)
   >         at 
org.apache.hugegraph.loader.builder.EdgeBuilder.<init>(EdgeBuilder.java:58)
   >         at 
org.apache.hugegraph.loader.task.ParseTaskBuilder.<init>(ParseTaskBuilder.java:60)
   >         at 
org.apache.hugegraph.loader.HugeGraphLoader.loadStruct(HugeGraphLoader.java:233)
   >         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)
   > ```
   
   应该是你准备的数据格式有问题. 有三类导入文件:
   
   1. Schema 文件, groovy 写的
   2. 具体的数据文件, 你这里就是 csv 文件
   3. 映射文件
   
   建议: 
   1. 首先你指定的 Schema 应该是完整的;
   2. 其次应该选取小样本的数据, 比如你的 csv 文件有几亿行, 你先挑 10 行出来验证一下, 要是没问题后面再用原始数据
   3. 最后分步导入映射数据, 根据具体的点边每次导入某一两个类型, 这样问题的范围就小很多了.
   
   实在不行就一点一点地把样例改成你自己的数据.


-- 
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]

Reply via email to