Hello i have Neo 1.1.12 on Mac OSX
with Neo Browser 3.4.9
i have a problem when i import a CSV for relationships within 2 nodes types: USER(user_id, user_name) and PAGE(page_id,page_name)
the command is:
USING PERIODIC COMMIT 500
load csv with headers from "http://127.0.0.1/NEO/neo-likes.csv" as line
MATCH (a:USER{user_id: line.user})
MATCH (b:PAGE{page_id: line.page})
CREATE (a)-[:LIKES]->(b)
but unfortunately only a part of relationships from the CSV are executed (around 27k on 220k total)
i don't understand where's the problem... is there any log of errors?
cheers
Your syntax looks ok. This is most likely caused by failing to MATCH a user or a page by that data from the CSV.
Is it possible that the CSV is mentioning users and pages that aren't already in your database?
If you switch from MATCH to MERGE, it will always succeed and create the relationships that you expect, but may end up creating the new USER and PAGE nodes that are missing. If that's OK, that's a way to go. Otherwise look deeper at individual lines that are failing to match, and see what you find from there.
USING PERIODIC COMMIT 500
load csv with headers from "http://127.0.0.1/NEO/neo-likes.csv" as line
MERGE (a:USER{user_id: line.user})
MERGE (b:PAGE{page_id: line.page})
CREATE (a)-[:LIKES]->(b)
probably the problem was the ";" now i created the double index and re-imported the relationships very quickly but... only 26K of them...
don't understand whats wrong
load csv with headers from "http://127.0.0.1/NEO/neo-likes.csv" as line
OPTIONAL MATCH (a:USER{user_id: line.user})
OPTIONAL MATCH (b:PAGE{page_id: line.page})
WITH * WHERE a is null or b is null
RETURN line LIMIT 100