Insertion into Graphs using txt file

Skip to first unread message

Harinath K

Feb 4, 2015, 2:24:05 AM2/4/15
Hi all . I have data set  as below in txt while which contains the transaction of users. 
# FromNodeId    ToNodeId
0                             1
0                             2
0                             3
0                             4
0                             5
1                             0
1                             2
1                            4
1                            5
1                            15
2                            0
2                             11
2                             12

I need help how to create vertex and create edge between them. How can I do using program in automated way?. Node must not be repeated. any help would be useful for my project based on recommendation engine.

Luigi Dell'Aquila

Feb 4, 2015, 4:48:22 AM2/4/15
Hi Arinath,

if it's just a one-shot batch insert, you can write a simple Java program and use OGraphBatchInsertBasic class, that is specifically designed for this simple use case.

Otherwise you could think about using OrientDB ETL and define a simple importer from CSV, see

Of course, doing the same in Java using Graph API would be a matter of a few lines of code, if you need help on this just let as know



You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Reply all
Reply to author
0 new messages