Closed mitjarogl closed 10 years ago
Can you try to provide an empty rels file? Just for testing.
Does it say anything else, like "using existing batch.properties"
I have provided empty rels, but still get error.
Yes, it is saying "Using existing configuration File" and I get this error.
Exception in thread "main" java.lang.IllegalStateException: Index users age works_on not configured. at org.neo4j.batchimport.Importer.importNodes(Importer.java:108) at org.neo4j.batchimport.Importer.doImport(Importer.java:228) at org.neo4j.batchimport.Importer.main(Importer.java:83)
Probably you have got no index created as stated in error message. Ommit ":users" from respective field header.
On Sun, Jan 12, 2014 at 8:19 PM, extra90 notifications@github.com wrote:
I have provided empty rels, but still get error. Yes, it is saying "Using existing configuration File" and I get this error. Exception in thread "main" java.lang.IllegalStateException: Index users age works_on not configured.
at org.neo4j.batchimport.Importer.importNodes(Importer.java:108) at org.neo4j.batchimport.Importer.doImport(Importer.java:228) at org.neo4j.batchimport.Importer.main(Importer.java:83)
— Reply to this email directly or view it on GitHubhttps://github.com/jexp/batch-import/issues/76#issuecomment-32130927 .
I have omit ":users" like you said. But still get error, below you can see it . If I omit ":users" then will be no auto-index like I have configured in batch.properties batch_import.node_index.users=exact
?
However, all nodes are imported.
OUTPUT in cmd
`Using Existing Configuration File
Importing 4 Nodes took 0 seconds
Total import time: 3 seconds
Exception in thread "main" java.lang.NullPointerException
at org.neo4j.batchimport.importer.AbstractLineData.createHeaders(Abstrac
tLineData.java:40)
at org.neo4j.batchimport.importer.CsvLineData.<init>(CsvLineData.java:16
)
at org.neo4j.batchimport.Importer.createLineData(Importer.java:173)
at org.neo4j.batchimport.Importer.importRelationships(Importer.java:140)
at org.neo4j.batchimport.Importer.doImport(Importer.java:232)
at org.neo4j.batchimport.Importer.main(Importer.java:83)`
Probably you do not have tab separated header of the nodes file. I have simulated the almost the same error with separating "age" by a space from "name" field instead of a tab. Check the csv file and tab it properly.
On Mon, Jan 13, 2014 at 5:14 PM, extra90 notifications@github.com wrote:
I have omit ":users" like you said. But still get error, below you can see it If I omit ":users" then will be no auto-index like I have configured in batch.properties batch_import.node_index.users=exact. However, all nodes are imported.
OUTPUT in cmd
`Using Existing Configuration File
Importing 4 Nodes took 0 seconds
Total import time: 3 seconds Exception in thread "main" java.lang.NullPointerException at org.neo4j.batchimport.importer.AbstractLineData.createHeaders(Abstrac tLineData.java:40) at org.neo4j.batchimport.importer.CsvLineData.(CsvLineData.java:16 ) at org.neo4j.batchimport.Importer.createLineData(Importer.java:173) at org.neo4j.batchimport.Importer.importRelationships(Importer.java:140)
at org.neo4j.batchimport.Importer.doImport(Importer.java:232) at org.neo4j.batchimport.Importer.main(Importer.java:83)`
— Reply to this email directly or view it on GitHubhttps://github.com/jexp/batch-import/issues/76#issuecomment-32183484 .
I have checked my csv file and it is tab-it properly. Now I get this error, just for users.
Exception in thread "main" java.lang.IllegalStateException: Index users not conf igured.
But the batch.properties
that you showed is in the C:\Users\X\Desktop\batch_importer_20
directory? Nowhere else (eg. sample)? The importer looks just in the current directory by default and creates a new config file if there isn't one.
You have imported your original csv file. Remove index ":users" from the header.
On Tue, Jan 14, 2014 at 9:40 AM, extra90 notifications@github.com wrote:
I have checked my csv file and it is tab-it properly. Now I get this error, just for users.
Exception in thread "main" java.lang.IllegalStateException: Index users not conf igured.
—
Reply to this email directly or view it on GitHubhttps://github.com/jexp/batch-import/issues/76#issuecomment-32246989 .
@jexp Like you said I was putting batch_import.node_index.users=exact
into the subdirectory sample instead of main directory where is also file batch.properties
. Thanks for solution.
Do you have any test data in csv (tab separated) format, where is about 1 million records. Thanks :)
There is a test-data-generator which can generate simple test data for imports.
Usage (for unix)
./generate.sh #nodes #rels-per-node REL_TYPE1,REL_TYPE2,REL_TYPE3
e.g.
./generate.sh 1000000 25 KNOWS,LOVES,HATES
For windows you would need a batch-file, perhaps adapt import.bat to just call the TestDataGenerator
actually I need some real data, where can I execute some logical queries.
Then you'll have to write a generator yourself or use something like the musicbrainz import dataset ?
http://blog.neo4j.org/2013/11/musicbrainz-in-neo4j-part-1.html
I have downloaded Neo4j Community 2.0.0 edition for Windows and zip (CSV) Batch Importer 2.0. I'm trying to import csv files to Neo4j db. For now I'm using just nodes2.csv without relations.
I' m using these samples:
nodes2.csv
batch.properties
I have executed like this:
But I get this error: