简体   繁体   中英

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

I would like to have a property called "friendsSince" on the edge. People are discussing the edgeFields attribute when importing from csv but I am not sure how to use it when importing from JSON.

You can use edgeFields in edge transformer. Example:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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