O'Reilly logo

Learning Neo4j 3.x - Second Edition by Rik Van Bruggen, Jérôme Baton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scaling the import

If your CSV file is large has (many columns, such as preceding 50, I even saw 100+) and long (has many lines), you may face an OutOfMemoryException crashing your import. To avoid this, a solution is to make the transaction commit periodically. To benefit from this, just add the following:

USING PERIODIC COMMIT nLOAD CSV ....

Here, the value of n is the number of rows processed by the transaction.

Now, let's import some JSON data!

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required