Hello, we have a vertex Person and a directed edge TO and FROM Person with one attribute of type MAP<STRING, INT>
eg., person1 -(MAP[“07/2020” -> 10,“08/2020” -> 4])-> person2
We have query that inserts this type of data initially.
After initial load, is there a way to update the map value in the edge? We could also have instances where we may need to insert as well.
We have a query that calculates the changes to initial load and generates an accum that stores (FROM eg., person1, TO eg., person2, MAP eg., [“08/2020” -> 6, “09/2020” -> 1])
eg., If that query finds -
-
Finds count for “08/2020” from person1 to person2 is changed to 6 now then it should update it to following,
person1 -(MAP[“07/2020” -> 10,“08/2020” -> 6])-> person2 -
Finds count for “09/2020” from person1 to person2 is changed to 3 now then it should update it to following,
person1 -(MAP[“07/2020” -> 10,“08/2020” -> 6,“09/2020” -> 6])-> person2 -
Finds that unconnected person3 and person4 now has a “09/2020”: 1 then it should insert the edge between person3 and person4 as following
person3 -(MAP[“09/2020” -> 1])-> person4
Is there a way to achieve this scenario in a query?