0
votes

Helo, I get an error while trying to import the tutorial from here: https://www.javacodegeeks.com/2015/04/spark-generating-csv-files-to-import-into-neo4j.html , my only change is I need to use it with ; as delimeter

I want to use ; as a delimeter. It has to be done through this neo4j import method and not using LOAD CSV with Cypher, so this the only method, and I dont know why it is not working

first two lines crimes.csv id:ID(Crime);:LABEL;date;description;caseNumber;arrest:Boolean;domestic:Boolean;fbiCode 10465449;Crime;03/28/2016 11:52:00 PM;POSSESSION OF DRUG EQUIPMENT;HZ204933;true;false;18

illegalArgumentException

Thank you

2
Have you tried using arrest:boolean instead of arrest:Boolean? And why can't you use ";" as a delimiter with LOAD CSV? The example in the Neo4j manual uses it: LOAD CSV FROM 'http://neo4j.com/docs/2.3.3/csv/artists-fieldterminator.csv' AS line FIELDTERMINATOR ';' CREATE (:Artist { name: line[1], year: toInt(line[2])})Oliver Frost
I would also try something like LOAD CSV FROM ... as line FIELDTERMINATOR ';' WITH line LIMIT 1 RETURN line to look at your file in the excellent neeo4j browser toolBtibert3

2 Answers

1
votes
  1. The import tool's default array delimiter is the semicolon (";"). So, if you want to use ";" as the field delimiter, you also need to change the array delimiter.

  2. You should quote the delimiter characters on the command line, to to avoid possible issues.

Try using something like this to specify the delimiters on the command line (assuming "|" is not used in your CSV files):

--delimiter ";" --array-delimiter "|"
0
votes

thanks for the responses

problem was I used "delimeter" instead of "delimiter" changing it to delimiter fixed my problem