gremlin python retrieve ids and labels (valueMap(True))
--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Beneath the City Looping
--
Chapters
00:00 Gremlin Python Retrieve Ids And Labels (Valuemap(True))
01:05 Accepted Answer Score 3
01:46 Thank you
--
Full question
https://stackoverflow.com/questions/4835...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #python3x #gremlin #tinkerpop3 #amazonneptune
#avk47
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Beneath the City Looping
--
Chapters
00:00 Gremlin Python Retrieve Ids And Labels (Valuemap(True))
01:05 Accepted Answer Score 3
01:46 Thank you
--
Full question
https://stackoverflow.com/questions/4835...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #python3x #gremlin #tinkerpop3 #amazonneptune
#avk47
ACCEPTED ANSWER
Score 3
My guess is that you are running into trouble with this recently reported bug with valueMap(true):
https://issues.apache.org/jira/browse/TINKERPOP-1860
it is patched and will be fixed with release of 3.3.2. Until then you will have to work around the issue as there really is no fix short of reverting to GraphSON 2.0 (which comes with it's own set of downsides). One workaround would be to project() your results:
gremlin> g.V().project('props','id','label').
......1> by(valueMap()).
......2> by(id).
......3> by(label)
==>[props:[name:[marko],age:[29]],id:1,label:person]
==>[props:[name:[vadas],age:[27]],id:2,label:person]
==>[props:[name:[lop],lang:[java]],id:3,label:software]
==>[props:[name:[josh],age:[32]],id:4,label:person]
==>[props:[name:[ripple],lang:[java]],id:5,label:software]
==>[props:[name:[peter],age:[35]],id:6,label:person]