简体   繁体   English

具有来自JSON的边缘属性的OrientDB etl

[英]OrientDB etl with edge properties from json

I am using the instructions at http://orientdb.com/docs/last/Import-from-JSON.html to load a json file into orientdb. 我正在使用http://orientdb.com/docs/last/Import-from-JSON.html上的说明将json文件加载到orientdb中。 Everything of course works. 当然一切正常。 I am now trying to add properties to edges and I really don't know how to change the input and the etl files to recognize edge properties. 我现在正在尝试向边缘添加属性,但我真的不知道如何更改输入和etl文件以识别边缘属性。

I would like to have a property called "friendsSince" on the edge. 我想在边缘拥有一个名为“ friendsSince”的属性。 People are discussing the edgeFields attribute when importing from csv but I am not sure how to use it when importing from JSON. 人们正在讨论从csv导入时的edgeFields属性,但是我不确定从JSON导入时如何使用它。

You can use edgeFields in edge transformer. 您可以在边缘转换器中使用edgeFields。 Example: 例:

"edge":{
   "class":"Account",
   "joinFieldName":"friends",
   "lookup":"Account.id",
   "direction":"out",
   "edgeFields": { "YOR_PROPERTY": "${input.YOR_PROPERTY}" },
   "unresolvedLinkAction":"NOTHING"
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM