I am very new to Gremlin. I am trying to build a graph on DSE graph using Gremlin. I am able to create the vertices:
a = graph.addVertex(label, \'label1\',
Nested g.V()
's are usually a bad idea. You can solve the problem using a single traversal:
g.V().hasLabel("label1").as("a").
V().hasLabel("label2").as("b").
where("a", eq("b")).by("key").
addE("link").from("a").to("b")
Also note that you'll have to allow scans in DSE Graph to make this traversal work.