I already have a neo4j database in which I use the first column (H1) to merge the nodes and use the rows of H2 and H3 to create a new node. When I strip off the header row, my code looks like this -
LOAD CSV FROM 'file:///mycsv.csv' AS row
MERGE (a:existingNode {name:row[0]})
CREATE (b:NewNode {name1:row[2], name2: row[1], name3: row[0]})
MERGE (a)-[:isAssociated]->(b)
How do I import the CSV so that the rest of the headers H4, H5,... are set as properties of the created node (based on H2 and H3) without having to assign each header under the created node? I want the header names as properties. Thanks.