我从AWS Marketplace AMI运行OrientDB 2.1.2。我已经使用ETL来加载两组顶点。现在我试图用ETL将一个Edges文件加载到OrientDB中,并获取:IllegalArgumentException:目标顶点为空。我查看了网上的文档和一些其他示例,我的ETL配置对我来说是正确的。我希望有人可能有一个想法。使用OrientDB ETL加载边缘文件
我的两个V子类:
作者(的AuthorID,authGivenName,authSurname)和AUTHORID
摘要(abstractId)与指数abstractId
我的E指数子类
创作 - 未定义属性或索引
我的边缘文件
(AUTHORID,abstractId) - \吨与这些名字一个标题行分隔的字段
我ETL配置:
{
"config": { "log":"debug"},
"source" : { "file": { "path":"/root/poc1_Datasets/authAbstractEdge1.tsv" }},
"extractor":{ "row":{} },
"transformers":[
{ "csv":{ "separator": "\t" } },
{ "merge": {
"joinFieldName": "authorId",
"lookup":"Author.authorId"
} },
{ "vertex":{ "class":"Author" } },
{ "edge" : {
"class": "Authored",
"joinFieldName": "abstractId",
"lookup": "Abstract.abstractId",
"direction": "out"
}}
],
"loader":{
"orientdb":{
"dbURL":"remote:localhost/DataSpine1",
"dbType":"graph",
"wal":false,
"tx":false
} }
}
当我使用这个配置和文件运行ETL:
OrientDB etl v.2.1.2 (build @[email protected]) www.orientdb.com
BEGIN ETL PROCESSOR
[file] DEBUG Reading from file /root/poc1_Datasets/authAbstractEdge1.tsv
[0:csv] DEBUG Transformer input: authorId abstractId
[0:csv] DEBUG parsing=authorId abstractId
[0:csv] DEBUG Transformer output: null
2016-06-09 12:15:04:088 WARNI Transformer [csv] returned null, skip rest of pipeline execution [OETLPipeline][1:csv] DEBUG Transformer input: 9-s2.0-10039026700 2-s2.0-29144536313
[1:csv] DEBUG parsing=9-s2.0-10039026700 2-s2.0-29144536313
[1:csv] DEBUG document={authorId:9-s2.0-10039026700,abstractId:2-s2.0-29144536313}
[1:csv] DEBUG Transformer output: {authorId:9-s2.0-10039026700,abstractId:2-s2.0-29144536313}
[1:merge] DEBUG Transformer input: {authorId:9-s2.0-10039026700,abstractId:2-s2.0-29144536313}
[1:merge] DEBUG joinValue=9-s2.0-10039026700, lookupResult=Author#12:10046021{authorId:9-s2.0-10039026700,authGivenName:M. A.,authSurname:Turovskaya,abstractId:2-s2.0-29144536313} v2
[1:merge] DEBUG merged record Author#12:10046021{authorId:9-s2.0-10039026700,authGivenName:M. A.,authSurname:Turovskaya,abstractId:2-s2.0-29144536313} v2 with found record={authorId:9-s2.0-10039026700,abstractId:2-s2.0-29144536313}
[1:merge] DEBUG Transformer output: Author#12:10046021{authorId:9-s2.0-10039026700,authGivenName:M. A.,authSurname:Turovskaya,abstractId:2-s2.0-29144536313} v2
[1:vertex] DEBUG Transformer input: Author#12:10046021{authorId:9-s2.0-10039026700,authGivenName:M. A.,authSurname:Turovskaya,abstractId:2-s2.0-29144536313} v2
[1:vertex] DEBUG Transformer output: v(Author)[#12:10046021]
[1:edge] DEBUG Transformer input: v(Author)[#12:10046021]
[1:edge] DEBUG joinCurrentValue=2-s2.0-29144536313, lookupResult=Abstract#13:16626366{abstractId:2-s2.0-29144536313} v1
Error in Pipeline execution: java.lang.IllegalArgumentException: destination vertex is null
java.lang.IllegalArgumentException: destination vertex is null
at com.tinkerpop.blueprints.impls.orient.OrientVertex.addEdge(OrientVertex.java:888)
at com.tinkerpop.blueprints.impls.orient.OrientVertex.addEdge(OrientVertex.java:832)
at com.orientechnologies.orient.etl.transformer.OEdgeTransformer.createEdge(OEdgeTransformer.java:188)
at com.orientechnologies.orient.etl.transformer.OEdgeTransformer.executeTransform(OEdgeTransformer.java:117)
at com.orientechnologies.orient.etl.transformer.OAbstractTransformer.transform(OAbstractTransformer.java:37)
at com.orientechnologies.orient.etl.OETLPipeline.execute(OETLPipeline.java:114)
at com.orientechnologies.orient.etl.OETLProcessor.executeSequentially(OETLProcessor.java:487)
at com.orientechnologies.orient.etl.OETLProcessor.execute(OETLProcessor.java:291)
at com.orientechnologies.orient.etl.OETLProcessor.main(OETLProcessor.java:161)
ETL process halted: com.orientechnologies.orient.etl.OETLProcessHaltedException: java.lang.IllegalArgumentException: destination vertex is null
当我看调试时,看起来MERGE成功找到了作者顶点,而EDGE成功找到Abstract Vertex(基于查看输出中的RID)。我很难理解为什么我得到例外。提前感谢任何指针。
感谢您的建议。不幸的是,我从原始XML文件中提取我的图形数据,并没有发挥RDBMS的作用。 –