Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-20-2020 03:40 AM
hello,
I'm trying to import data using this code:
:auto USING PERIODIC COMMIT 500
LOAD CSV WITH HEADERS FROM "file:///followers.csv" AS followers
MERGE (followed:User {twitter_id: followers.followed})
MERGE (follower:User {twitter_id: followers.follower})
MERGE(follower)-[:FOLLOW]->(followed)
But seems that my RAM is not enough to execute the query, I tried to split it into two queries and I just tried to execute this one:
:auto USING PERIODIC COMMIT 500
LOAD CSV WITH HEADERS FROM "file:///followers.csv" AS followers
MERGE (:User {twitter_id: followers.followed})
MERGE (:User {twitter_id: followers.follower})
but I always get the same problem, how should I write the query to solve? increasing the commit frequency doesn't help.
I have to say that the first two MERGE will fail a lot of times because there are a lot of duplicated entries in the file, I don't know if it is important.
thanks
06-21-2020 03:34 AM
Follow the below mentioned sequence and see if memory error goes away
PROFILE
on your queries to see if they use EAGER loading06-21-2020 05:51 AM
Hi Jupiter,
Welcome to the community!!
Kindly lets know the available RAM in your system and also the dataset size you are trying to ingest.
As per the query you have mentioned it should not have any problem in ingest unless and until you are very less available memory. Also I hope you have not modified memory configuration setting in the config file.
Also for the time being try below
USING PERIODIC COMMIT 500
LOAD CSV WITH HEADERS FROM "file:///followers.csv" AS followers
MERGE (followed:User {twitter_id: followers.followed})
USING PERIODIC COMMIT 500
LOAD CSV WITH HEADERS FROM "file:///followers.csv" AS followers
MERGE (follower:User {twitter_id: followers.follower})
USING PERIODIC COMMIT 500
LOAD CSV WITH HEADERS FROM "file:///followers.csv" AS followers
Match (followed:User {twitter_id: followers.followed})
Match (follower:User {twitter_id: followers.follower})
MERGE(follower)-[:FOLLOW]->(followed)
06-25-2020 10:58 AM
This solved for me, thanks!
All the sessions of the conference are now available online