简体   繁体   English

将CSV导入具有多个边缘属性的OrientDB中

[英]Import CSV into OrientDB with multiple edge properties

Given a CSV file like so: 给定这样的CSV文件:

vertex1,vertex2,edgeProperty1,edgeProperty2 (Two vertices and an edge between them with two properties) vertex1,vertex2,edgeProperty1,edgeProperty2(两个顶点以及两个属性之间的边)

What is the easiest way to import this into OrientDB? 将其导入OrientDB的最简单方法是什么?

A combination of Insert statements and SQLCreateEdge in a OrientDB console script perhaps? 也许在OrientDB控制台脚本中结合使用Insert语句和SQLCreateEdge?

Answer given by LVC @ https://groups.google.com/forum/#!topic/orient-database/wjaotdHioVQ LVC @ https://groups.google.com/forum/#!topic/orient-database/wjaotdHioVQ给出的答案

create edge Likes from (create vertex People set name ="Alice") to (create vertex People set name ="Bob") set property1="something", property2= "somethingElse"

Or if there are vertices with multiple edges: 或者,如果存在具有多个边的顶点:

INSERT INTO People (name) values ("Alice")
INSERT INTO People (name) values ("Bob")

Create Edge Likes from (select from People where name ="Alice") to (select from People where name ="Bob") set property1="something", property2= "somethingElse"

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

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