Hi
I've been struggling for awhile trying to upload transactions to Neo4j. I have 1 list of "from" addresses, another list of "to" addresses, and a third list of "values". I want to draw a single relationship from an index in the "from" list to the corresponding index in the "to" list, each including the corresponding index of the "values" list. E.g.:
(a:user {id: from_address})-[:SENT {value: value}]->(b:user {id: to_address})
My preliminary solution was to try unwinds and foreach's but each item from my first list sends to every single index of list 2 creating wayyy too many incorrect relationships. My sample code is below:
unwind [A1, B2, C3] as val
unwind ['a','b','c'] as from_addr
merge (a:utest {id: from_addr}) with a
unwind ['1','2','3'] as to_addr
merge (b:utest {id: to_addr}) with distinct a, b
Create (a)-[:SENT {val} ]->(b)
I feel I'm very close and am just wondering how I can have 6 nodes with only 3 relationships (a to 1, b to 2, c to 3. Thanks!!