Flexible Neo4j Batch Import with Groovy by Michael Hunger.
From the post:
You might have data as CSV files to create nodes and relationships from in your Neo4j Graph Database.
It might be a lot of data, like many tens of million lines.
Too much for LOAD CSV to handle transactionally.Usually you can just fire up my batch-importer and prepare node and relationship files that adhere to its input format requirements.
Your Requirements
There are some things you probably want to do differently than the batch-importer does by default:
- not create legacy indexes
- not index properties at all that you just need for connecting data
- create schema indexes
- skip certain columns
- rename properties from the column names
- create your own labels based on the data in the row
- convert column values into Neo4j types (e.g. split strings or parse JSON)
Michael helps you avoid the defaults of batch importing into Neo4j.