1
Fork 0
mirror of https://github.com/Steffo99/unimore-bda-4.git synced 2024-11-23 16:34:24 +00:00
bda-4-steffo/scripts/import-cratesio/5-crates_categories.cypher

9 lines
308 B
Text
Raw Permalink Normal View History

2022-11-25 08:31:19 +00:00
MATCH (:Category)-[relation:CONTAINS]->(:Crate)
DELETE relation;
LOAD CSV WITH HEADERS FROM "file:///crates_categories.csv" AS line FIELDTERMINATOR ","
MATCH
(crate:Crate {id: toInteger(line.crate_id)}),
(category:Category {id: toInteger(line.category_id)})
CREATE (category)-[:CONTAINS]->(crate);