2017-01-11 50 views
0

我正在使用http://orientdb.com/docs/last/Import-from-JSON.html上的說明將json文件加載到orientdb中。一切當然有效。我現在試圖添加屬性到邊緣,我真的不知道如何改變輸入和etl文件來識別邊緣屬性。我想在邊緣有一個名爲「friendsSince」的屬性。人們在從csv導入時正在討論edgeFields屬性,但我不確定如何從JSON導入時使用它。提前致謝!OrientDB etl具有來自json的邊緣屬性

回答

0

您可以在邊緣變換器中使用edgeFields。例如:

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

這適用於csv,但我需要json。什麼是$輸入? – user7406833

+0

另一個問題是:如果我有多個邊從頂點出來,每個都有不同的屬性? – user7406833