While LOAD CSV getting error 'Neo.DatabaseError.Statement.ExecutionFailed'

Hi,

While csv file LOAD I am getting below error for some quote at position, as below:

Neo.DatabaseError.Statement.ExecutionFailed

At Dropbox @ position 96611 - there's a field starting with a quote and whereas it ends that quote there seems to be characters in that field after that ending quote. That isn't supported. This is what I read: 'environment":'

Cypher:
LOAD CSV WITH HEADERS FROM 'Dropbox' AS row

MERGE (o:Object {objectName: row.ObjectName})
SET
o.objectApp = row.ObjectApp,
o.objectType = row.ObjectType

Please suggest how to correct this ?

Thanks

I think the issue is in your data. Can you post it?

Above query have been resolved. Seems it was due to FIELDTERMINATOR , I created a comma seperated CSV, but when I pasted the sample data here, it appears instead of ',' it is '|'.
But now I am facing another error:

Neo.ClientError.Statement.SemanticError

Cannot merge the following node because of null property value for 'objectId': (:Object {objectId: null})

Query:
LOAD CSV WITH HEADERS
FROM 'Dropbox' AS row
FIELDTERMINATOR '|'
MERGE (o:Object {objectId: toInteger(row.ObjectId)})
SET
o.objectName = row.ObjectName,
o.objectApp = row.ObjectApp,
o.objectType = row.ObjectType

Sample Data:

ObjectId ObjectApp ObjectName ObjectType ObjectDDM DBCreate DBRead DBUpdate DBDelete ETBT
1 ABC ADA001 P ABCD-INKASSO Y
2 ABC ADA02N01 N ABCD-INKASSO Y
3 ABC ADA02P01 P
4 ABC ADA10N06 N ABCD-UMSATZ Y
5 ABC ADAA001 P
6 ABC ADAA0010 P Y
7 ABC ADAA002 P
8 ABC ADAA003 P ABCD-BEARBSCHR Y Y
9 ABC ADAA009 P Y
10 ABC ADAA01 P ABCD-BEARBSCHR ABCD-INKASSO Y

Could you please suggest.

Thanks

You can not merge nodes with null values for the match properties. You can either skip these nodes in your import or set a default value using coalesce.

You can skip with a 'with' and 'where' clause following your 'Load with csv' and before the 'merge'.

Can you can see in above data there is no null value in ObjectId column, also I have used both the options:

LOAD CSV WITH HEADERS
FROM 'Dropbox' AS row
FIELDTERMINATOR '|'
WITH row WHERE row.ObjectId IS NOT NULL
MERGE (o:Object {objectId: toInteger(row.ObjectId)})
SET
o.objectName = row.ObjectName,
o.objectApp = row.ObjectApp,
o.objectType = row.ObjectType

and

MERGE (o:Object {objectName: COALESCE(row.ObjectId, '9999')})

still the same issue.

Then I tried below cypher:

LOAD CSV FROM 'Dropbox' AS row
RETURN row limit 1

and this returns

[""]
.

Seems there is some issue with my csv file, but I have tried everything, not getting what I am missing.
Could you please check below csv file and suggest what I missed.

CSV File

Thanks

When I click on the "CSV File" to view the file in your dropbox, I am presented with a grid that has the 'id' in a column without a header. It looks like a generated row counter. The file does not contain that column when downloaded, thus it does not have the ObjectId column in the data your are loading.

I suggest you create a column in your spreadsheet for ObjectId and fill it with a series.