1

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!

mamta
  • 35
  • 1
  • 7

2 Answers2

1

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.

mamta
  • 35
  • 1
  • 7
0

If you can't see any properties in the schema, this means you're working in schema-less mode, but the graph could be imported correctly. Try executing this:

select * from V

and:

select * from E

Can you see attributes?

Lvca
  • 8,938
  • 2
  • 24
  • 25
  • This is what I get when a ran this. Don't see any attributes. orientdb {db=test}> select * from V ----+-----+------+------------------+-------- # |@RID |@CLASS|out_KNOWS |in_KNOWS ----+-----+------+------------------+-------- 0 |#9:0 |V |null |null 1 |#9:1 |V |null |null 2 |#9:2 |V |null |null How do I change it to schema mode? – mamta Jul 21 '15 at 14:36
  • how you resolve this issue ?, i am facing the same issue . can you please help – Muhammad Adnan Aug 14 '16 at 14:21