Thank you for this example.
After running this, I can see that the property "metatest" has been ignored and is missing completely from the GraphML output. Another issue that I have with GraphML is that it cannot apparently represent all the key types that are supported by Janus. For example it does not define any attribute for "date" and "time", and it does not allow to specify "int32" or "int64"; it only defines basic primitives such as string, int, double.
What serialization format should I use to best match Janus? One that allows metaproperties and also all the various types (date, int32, char, etc.). I also need it to be human readable because I'm editing my graph file manually, and then I load this file into Janus. GraphML is not that bad, I can use it... it's just too limited given that it does not support the features mentioned above. Is there any better alternative? Or should I roll my own?
Sent: Wednesday, August 25, 2021 at 5:05 PM
From: hadoopmarc@...
To: janusgraph-users@...
Subject: Re: [janusgraph-users] graphml properties of properties
Hi Laura,
No. As the TinkerPop docs say: "graphML is a lossy format".
You can try for yourself with:gremlin> graph = TinkerFactory.createModern()
==>tinkergraph[vertices:6 edges:6]
gremlin> g = graph.traversal()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g.V(1).properties('name').elementMap()
==>[id:0,key:name,value:marko]
gremlin> g.V(1).properties('name').property('metatest', 'hi')
==>vp[name->marko]
gremlin> g.V(1).properties('name').elementMap()
==>[id:0,key:name,value:marko,metatest:hi]
gremlin> g.addV('person').property('name', 'turing')
==>v[13]
gremlin> g.io('data/metatest.xml').write().iterate()
gremlin>Best wishes, Marc