Loading csv files

Hello,
I have 2 files one with nodes and features and the other have the edges (ID1 and ID2). I can load the nodes and create them but the edges doesn't work it loads for a long time and no changes are made.
Please if anyone can help me with this.

Can you provide the cypher you tried and a sample of you data file?

LOAD CSV WITH HEADERS FROM 'file:///nodes.csv' AS line
CREATE (:User {
id: toInteger(line.ID),
followers: toInteger(line.followers),
following: toInteger(line.following),
location: line.location,
profileImageUrl: line.profile_image_url,
screenName: line.screen_name,
statuses: line.statuses,
url: line.url
});

LOAD CSV WITH HEADERS FROM 'file:///relations.csv' AS line
MATCH (u1:User {id: toInteger(line.START_ID)})
MATCH (u2:User {id: toInteger(line.END_ID)})
MERGE (u1)-[:FOLLOWS_IN]->(u2)

nodes csv have 38986 rows and the relations have 44630


this is a debug if it might help

Your ‘id’, ‘start_id’, and ‘end_id’ column names begin with a colon. This doesn’t match what you are using in your cypher. I suggest you edit the two files to remove the colons and try again.

Thx it worked after 30 min of loading

1 Like