Insertion into Graphs using txt file

28 views
Skip to first unread message

Harinath K

unread,
Feb 4, 2015, 2:24:05 AM2/4/15
to orient-...@googlegroups.com
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

unread,
Feb 4, 2015, 4:48:22 AM2/4/15
to orient-...@googlegroups.com
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 http://www.orientechnologies.com/docs/last/orientdb-etl.wiki/Introduction.html

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

Luigi




--

---
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 orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages