IllegalArgumentException while Neo4j import

2019-03-06 01:56发布

问题:

I am trying to import data from multiple files using Neo4j import-tool. However, each time I try to import the nodes using this command I get an error:

bin/neo4j-admin import --database test.db --mode csv --nodes:Member "import/members_headers.csv,import/members/members1.csv,import/members/members2.csv,import/members/members3.csv" --ignore-duplicate-nodes=true --ignore-missing-nodes=true

This is the error I get:

Import error: '20'
Caused by:'20'
java.lang.IllegalArgumentException: '20'
    at org.neo4j.csv.reader.Extractors.valueOf(Extractors.java:155)
    at org.neo4j.unsafe.impl.batchimport.input.csv.DataFactories$DefaultNodeFileHeaderParser.entry(DataFactories.java:317)
    at org.neo4j.unsafe.impl.batchimport.input.csv.DataFactories$AbstractDefaultFileHeaderParser.create(DataFactories.java:175)
    at org.neo4j.unsafe.impl.batchimport.input.csv.ParallelInputEntityDeserializer.<init>(ParallelInputEntityDeserializer.java:86)
    at org.neo4j.unsafe.impl.batchimport.input.csv.InputGroupsDeserializer.createNestedIterator(InputGroupsDeserializer.java:113)
    at org.neo4j.unsafe.impl.batchimport.input.csv.InputGroupsDeserializer.createNestedIterator(InputGroupsDeserializer.java:38)
    at org.neo4j.helpers.collection.NestingIterator.fetchNextOrNull(NestingIterator.java:68)
    at org.neo4j.helpers.collection.PrefetchingIterator.peek(PrefetchingIterator.java:60)
    at org.neo4j.helpers.collection.PrefetchingIterator.hasNext(PrefetchingIterator.java:46)
    at org.neo4j.unsafe.impl.batchimport.staging.IteratorBatcherStep.nextBatchOrNull(IteratorBatcherStep.java:63)
    at org.neo4j.unsafe.impl.batchimport.InputIteratorBatcherStep.nextBatchOrNull(InputIteratorBatcherStep.java:46)
    at org.neo4j.unsafe.impl.batchimport.staging.PullingProducerStep.process(PullingProducerStep.java:43)
    at org.neo4j.unsafe.impl.batchimport.staging.ProducerStep$1.run(ProducerStep.java:61)

I checked that this number changes for each file, for members1.csv it's 20, for members3.csv it's 48 and so on. I have practically 200 files for this node and I can't check all the fields by hand. How can I find out what columns cause this error or whatever else?

UPDATE: A listing of rows:

"member_id:ID(Member)","bio","city","country","hometown","joined","lat:FLOAT","link","lon:FLOAT","member_name","state","member_status","visited","group_id:INT"
10206,Met fan from birth born the same year as Shea,New York,us,not_found,2008-02-18 18:10:20,40.73,http://www.meetup.com/members/10206,-73.99,John Hammer,NY,active,2008-02-18 18:10:20,403117
55155,not_found,New York,us,not_found,2002-10-02 19:58:03,40.75,http://www.meetup.com/members/55155,-73.97,Barbara,NY,active,2009-10-16 21:54:33,85422
73470,not_found,San Francisco,us,not_found,2002-11-08 20:37:59,37.78,http://www.meetup.com/members/73470,-122.42,tchangsf,CA,active,2004-08-05 02:48:10,54659
95940,Let's see I started watching anime heavily around 2007 with Bleach and Naruto. Turns out I had been watching anime for years once I found out voltron was GoLion.,Chicago,us,not_found,2014-01-23 17:53:20,41.94,http://www.meetup.com/members/95940,-87.75,Joshua Rose,IL,active,2014-07-14 14:07:24,12220382
171642,After a recent trip to Guatemala for Spanish classes I am looking to keep my conversational Spanish in practice,New York,us,not_found,2014-02-19 21:59:38,40.76,http://www.meetup.com/members/171642,-73.97,Alice,NY,active,2016-06-08 15:07:18,145951
183955,not_found,San Francisco,us,not_found,2016-05-03 02:54:55,37.76,http://www.meetup.com/members/183955,-122.44,Cedrick A,CA,active,2017-10-31 05:13:15,618694
205837,not_found,New York,us,New York,2015-03-16 18:34:03,40.75,http://www.meetup.com/members/205837,-73.99,Biz,NY,active,2015-03-20 00:54:02,1413487
230634,not_found,New York,us,not_found,2009-09-13 16:51:39,40.75,http://www.meetup.com/members/230634,-73.99,kstravis,NY,active,2010-09-11 18:16:31,1488352