amandeep1520
amandeep1520
ATApache TinkerPop
Created by amandeep1520 on 2/16/2024 in #questions
Adding multiple properties to a vertex using gremlin-go
Thanks, I got it.
7 replies
ATApache TinkerPop
Created by amandeep1520 on 2/16/2024 in #questions
Adding multiple properties to a vertex using gremlin-go
All of the vertices may or may not have similar properties, indeed I will need to batch them. But I was thinking of a way in which I convert the struct to a Map and pass that as an argument The below code works for a single Map, my question is How can we pass an array of maps/dicts having diff set of properties to be inserted to db using gremlin in go? g.GetTraversal().WithSideEffect("properties", prop).AddV("Person").As("Vertex").SideEffect( g.GetTraversal().V().Select("properties").Unfold().As("KV").Select("Vertex").Property( g.GetTraversal().V().Select("KV").By(gremlingo.Column.Keys), g.GetTraversal().V().Select("KV").By(gremlingo.Column.Values), ), ).Next()
7 replies
ATApache TinkerPop
Created by amandeep1520 on 2/16/2024 in #questions
Adding multiple properties to a vertex using gremlin-go
Thanks, I did this:- g.GetTraversal().WithSideEffect("properties", prop).AddV("Person").As("Vertex").SideEffect( g.GetTraversal().V().Select("properties").Unfold().As("KV").Select("Vertex").Property( g.GetTraversal().V().Select("KV").By(gremlingo.Column.Keys), g.GetTraversal().V().Select("KV").By(gremlingo.Column.Values), ), ).Next() and it works. Next, I am trying to add multiple vertexes with multiple propeties. I want to add thousands of such vertexes with better performance so we can scale as well or is this overcomplicating?
7 replies