I am importing a .CSV file I exported from a relational database. The import is going fine, but when I try to create relationships between the created nodes, using their assigned labels, it is creating new nodes for the relationship rather than using the existing labels. I've been banging my head against this for 3 days - any ideas?
Code:
USING PERIODIC COMMIT
LOAD CSV WITH HEADERS FROM "file:///seshatdata/sellable_unit_features.csv" AS line
WITH line, SPLIT(line.ship_dt, '-') AS date
CREATE (sellableunit:SellableUnit {sellable_unit_id: line.sellable_unit_id, sellable_unit_nm: line.sellable_unit_nm, sellable_unit_version_id: line.sellable_unit_version_id})
MERGE (feature:Feature {Feature_id:line.feature_id, feature_nm: line.feature_nm})
CREATE (SellableUnit)-[r:CONTAINS]->(Feature)
SET r.start_year = TOINT(date[0]);
Obviously it's the line CREATE (SellableUnit)-[r:CONTAINS]->(Feature)
that's the culprit here - I just don't know why.