0
votes

I am using grades.csv data from the link below,

https://people.sc.fsu.edu/~jburkardt/data/csv/csv.html

I noticed that all the strings in the csv file were in "" and it causes

error messages: Neo.ClientError.Statement.SemanticError: Cannot merge node using null property value for Test1

so I removed the "" in the headers

the code I was trying to run:

LOAD CSV WITH HEADERS FROM 'file:///grades.csv' AS row MERGE (t:Test1 {Test1: row.Test1}) RETURN count(t); error message:

Neo.ClientError.Statement.SyntaxError: Type mismatch: expected Any, Map, Node, Relationship, Point, Duration, Date, Time, LocalTime, LocalDateTime or DateTime but was List<String> (line 2, column 24 (offset: 65)) "MERGE (t:Test1 {Test1: row.Test1})

2
What was the error with "? - Rajendra Kadam
Thanks. I updated the question. Sorry I am not to familiar with using stackoverflow - Hi_there

2 Answers

1
votes

Basically you can not merge node using null property value. In your case, Test1 must be null for one or more lines in your file. If you don't see blank values for Test1, please check is there is any blank line at the end of file.

You can also handle null check before MERGE using WHERE, like

LOAD CSV ... 
WHERE row.Test1 IS NOT NULL
MERGE (t:Test1 {Test1: row.Test1})
RETURN count(t);
0
votes

The issues are:

  1. The file is missing a comma after the Test1 value in the row for "Airpump".
  2. The file has white spaces between the values in each row. (Search for the regexp ", +" and replace with ",".)

Your query should work after fixing the above issues.