I am new for neo4j db. I've a large csv file which cannot fit in my machine's ram. Before I load all the records in db using USING PERIODIC COMMIT
, I want to test my cypher query on the small sample of data. How can I load load just 1000 rows of data and test out my query.
The data has columns in simplified form as [Employee, CompanyName]
. I want to create relationship as (:Employee)-[:Employed]->(:Company)
. The Employee and the CompanyName nodes are already loaded into the database.
You can limit the rows you want to import with:
USING PERIODIC COMMIT
LOAD CSV WITH HEADERS 'file:///yourcsvfile.csv' AS row
WITH row LIMIT 1000
...
and then continue with your usual import Cypher statements. This will read only the first 1000 lines of your file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With