Using Cosmos DB Gremlin API, I’m trying to create a gremlin query that summarizes edges by vertex labels by counts
The closest thing I can come up with doesn’t do the counting just deduping. Any help would be greatly appreciated
g.E().project('edge','in','out').
by(label()).
by(inV().label()).
by(outV().label()).dedup()
output
[
{
"edge": "uses",
"in": "software-system",
"out": "person"
},
{
"edge": "runs on",
"in": "container",
"out": "software-system"
},
{
"edge": "requires",
"in": "component",
"out": "container"
},
{
"edge": "embeds",
"in": "code",
"out": "component"
}
]
ideally output
[
{
"edge": "uses",
"in": "software-system",
"out": "person",
"count": 105
},
{
"edge": "runs on",
"in": "container",
"out": "software-system",
"count": 22
},
{
"edge": "requires",
"in": "component",
"out": "container",
"count": 15
},
{
"edge": "embeds",
"in": "code",
"out": "component",
"count": 6
}
]