I am using AWS Neptune with gremlin and I want to get the id of a vertex with all properties of the vertex in one query. How can I do this?
I have tried
g.V().hasLabel('file').valueMap(true)
but the output is:
{ "fileSize": [ "9170" ], "Gremlin.Net.Process.Traversal.T": "f1fce58306f85ca7050503160640d735c9919c8fc85881d65de80bfe31b5ca24", "mimeType": [ "text/html" ] }
No label and no id is there. The problem with
project('id','label',' fileSize', 'mimeType', 'malwareSource').
by(id).
by(label).
by('fileSize').
by('mimeType').
by('malwareSource')
is that the propertie malwareSource is sometimes part of a file vertex an sometimes not. So if there is no malwareSource property an exception is thrown.