Hi all,
this is my sample data
Name,L1,L2,L3
A,x,,
B,,x,
C,,x,
D,,,x
E,,,x
F,,x,
The graph should look like:
A->B, A->C, A->F
C->D, C->E
i tried to load the data with:
LOAD CSV WITH HEADERS
FROM 'file:///x.csv' AS row
with row where row.`L1` <> ''
merge (m:Product:Level1{name: row.Name, linenumber : linenumber()});
LOAD CSV WITH HEADERS
FROM 'file:///x.csv' AS row
with row where row.`L2` <> ''
merge (m:Product:Level2{name: row.Name, linenumber : linenumber()});
LOAD CSV WITH HEADERS
FROM 'file:///x' AS row
with row where row.`L3` <> ''
merge (m:Product:Level3{name: row.Name, linenumber : linenumber()});
this works, but i am sure there are easier solutions, of course.
I don't know how to build the references
Any help will highly appreciated!
Thanks