I tried to use Batch Importer to import CSV data into neo4j database.
At first I tried to import data without automatic indexing and it worked well. After that, I tried to use automatic indexing on example data nodes.csv and rels.csv:
nodes.csv:
name age works_on
Michael 37 neo4j
Selina 14
Rana 6
Selma 4
rels.csv:
start end type since counter:int
1 2 FATHER_OF 1998-07-10 1
1 3 FATHER_OF 2007-09-15 2
1 4 FATHER_OF 2008-05-03 3
3 4 SISTER_OF 2008-05-03 5
2 3 SISTER_OF 2007-09-15 7
The batch.properties file contains the following lines:
use_memory_mapped_buffers=true
neostore.nodestore.db.mapped_memory=100M
neostore.relationshipstore.db.mapped_memory=500M
neostore.propertystore.db.mapped_memory=1G
neostore.propertystore.db.strings.mapped_memory=200M
neostore.propertystore.db.arrays.mapped_memory=0M
neostore.propertystore.db.index.keys.mapped_memory=15M
neostore.propertystore.db.index.mapped_memory=15M
batch_import.node_index.users=exact
When trying to run batch importer on Windows, I got the following exceptions:
*I:\Research\Temporal Analysis\neo4j>java -server -Xmx4G -jar batch-import-jar-with-dependencies.jar data/graph.db nodes.csv rels.csv node_index users fulltext nodes_index.csv rel_index worked exact rels_index.csv*
Using Existing Configuration File
Total import time: 0 seconds
Exception in thread "main" java.lang.IllegalArgumentException: Unknown Type stri
ng:users
at org.neo4j.batchimport.importer.Type.fromString(Type.java:71)
at org.neo4j.batchimport.importer.RowData.parseTypes(RowData.java:52)
at org.neo4j.batchimport.importer.RowData.<init>(RowData.java:25)
at org.neo4j.batchimport.Importer.importNodes(Importer.java:89)
at org.neo4j.batchimport.Importer.main(Importer.java:57)
Looking for similar issues encountered by others, I came across this.
As I downloaded a Windows-ready jar file from this address, I'm wondering whether it contains any bugs or there is an error in any of .csv files or batch.properties.
If anyone managed to import auto-indexed data into neo4j database on windows machine, I would be very thankful to describe the right procedure.
Thank you!