I have 2 CSV files exported from mysql :
# Disease CSV Headers # Disease Master ID (autoincrement, pk) disease_name
# Tests CSV Headers #
Test Master
ID (autoincrement, pk),
test_name,
parent_disease_ID (points to ID column in Disease.
Master tbl)
I run following cypher commands :
LOAD CSV WITH HEADERS FROM.
"http://localhost/disease_mstr.csv" AS line
MERGE (d:Disease {did: toInteger(line.ID), diseasename:
line.disease_name})
LOAD CSV WITH HEADERS FROM.
"http://localhost/test_mstr.csv" AS line
MERGE (d:Tests {tid: toInteger(line.ID), testname:
line.test_name, did: toInteger(line.parent_disease_ID)})
MATCH (t:Tests), (d:Disease) CREATE (t:Tests)-
[r:TEST_FOR]->(d:Disease) RETURN t, r, d
Above cypher returns one disease connected to many tests whereas i want just the reverse! Can someone please correct me?