Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-18-2020 08:05 PM
0
I have to load around 5M Records in the Neo4j DB so I broke the excel into the chunks of 100K the Data is in Tabular Format and I am using CyperShell for that but seems like it has been more than 8 hours and it's still stuck on the first chunk
I'm Using
USING PERIODIC COMMIT
LOAD CSV WITH HEADERS from 'file://aa.xlsx' as row
MERGE (p1:L1 {Name: row.sl1})
MERGE (p2:L2 {Name: row.sl2})
MERGE (p3:L3 {Name: row.sl3, Path:row.sl3a})
MERGE (p4:L4 {Name: row.sl4})
MERGE (p5:L4 {Name: row.tl1})
MERGE (p6:L3 {Name: row.tl2})
MERGE (p7:L2 {Name: row.tl3, Path:row.tl3a})
MERGE (p8:L1 {Name: row.tl4})
MERGE (p1)-[:s]->(p2)-[:s]->(p3)-[:s]->(p4)-[:it]->(p5)-[:t]->(p6)-[:t]->(p7)-[:t]->(p8)```
Can Anyone Suggest me the changes or alternate Method to load the data in a faster way
I even Looked at neo4j-admin import but I'm a bit confused how to format the below excel for the same
Data in Excel Format
08-19-2020 12:39 AM
Hello @rockySingh and welcome to the Neo4j community
Did you use UNIQUE CONSTRAINT?
Otherwise, you should consider using it. It must be used on a single property and this will speed up loading.
Regards,
Cobra
08-19-2020 04:08 AM
Hi @Cobra The Data that I have is Already Unique
By Single Property do you mean I need to load the Nodes First for Each Label Individually then load the Relationships?
08-19-2020 04:57 AM
First, you must create a UNIQUE CONSTRAINT on your unique property
Then create nodes and relations
Which property is unique in your data?
All the sessions of the conference are now available online