Neo4j导入时出现IllegalArgumentException

时间:2018-04-17 14:23:58

标签: csv neo4j data-import

我正在尝试使用Neo4j导入工具从多个文件导入数据。但是,每次我尝试使用此命令导入节点时,都会收到错误:

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

这是我得到的错误:

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)

我检查过这个数字是为每个文件更改的,对于members1.csv它是20,对于members3.csv它是48,依此类推。我有几个200个文件用于此节点,我无法手动检查所有字段。如何找出哪些列导致此错误或其他什么?

更新: 行列表:

"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

0 个答案:

没有答案