Gremlin Python - Return edge with all properties

1,013 views
Skip to first unread message

PC

unread,
May 19, 2020, 2:57:45 PM5/19/20
to Gremlin-users

I'm using gremlin Python to query a Neptune DB. Given a vertices, I need to return all the outward edges with their 'from' and 'to' ids, label and any other properties.

The query below

query_result = g.V().has('name', 'marco').outE().inV().path().toList()

gives me the 'from' and 'to' in a form i can parse into a list of dicts, and a value map of the edge gives me the other values but i need it returned in a single list. my ideal format is [{from: x, to: y, label: foo, property1: bar},...]

Any help greatly appreciated.

Kelvin Lawrence

unread,
May 19, 2020, 4:11:56 PM5/19/20
to Gremlin-users
The question has a couple of answers already on Stack Overflow


Cheers
Kelvin
Reply all
Reply to author
Forward
0 new messages