Search code examples
neo4jorientdbgraphml

Neo4j to OrientDB: import database graphml is not importing the properties of nodes and relationships


I followed the documentation to migrate the data from Neo4j to OrientDB

out.graphml file has the label,type and property information. Snippet from the file below.

<node id="n259" labels=":FacebookUser:_FacebookUser"><data key="labels">:FacebookUser:_FacebookUser</data><data key="__type__">com.czen.social.model.FacebookUser</data><data key="firstName">Test</data><data key="lastName">Name</data><data key="id">1000085</data></node>

<edge id="e1172175" source="n402940" target="n5457" label="KNOWS"><data key="label">KNOWS</data><data key="__type__">com.czen.social.model.Relationship</data><data key="hired">true</data><data key="hiredTlm">Tue Apr 21 05:16:36 EDT 2015</data><data key="weight">35</data></edge>

After getting the graphml, I tried importing it to OrientDB


    orientdb {db=test}> IMPORT DATABASE /tmp/out.graphml
    Importing GRAPHML database from DATABASE /tmp/out.graphml...
    Transaction 14 has been committed in 0ms

    orientdb {db=test}> classes
    CLASSES
    ----------------------------------------------+------------------------------------+------------+----------------+
     NAME                                         | SUPERCLASS                         | CLUSTERS   | RECORDS        |
    ----------------------------------------------+------------------------------------+------------+----------------+
     E                                            |                                    | 10         |              0 |
     FacebookUser                                 | V                                  | 11         |           2190 |
     KNOWS                                        | E                                  | 14         |            171 |

We get to see the classname for FacebookUser but when we look at its info it doesn't list any property.


    orientdb {db=test}> info class FacebookUser

    Class................: FacebookUser
    Super class..........: V
    Default cluster......: facebookuser (id=11)
    Supported cluster ids: [11]
    Cluster selection....: round-robin

Is there anything that I am missing while importing it to OrientDB?

Thanks!


Solution

  • With the new 2.1 snapshot from https://oss.sonatype.org/content/repositories/snapshots/com/orientechnologies/orientdb-community/ this issue was resolved. I had to replace field id with uid as otherwise it was getting ignored wasn't shown in the class info. Thanks Luca for providing the snapshot with the fix.