Cannot merge node using null property value error when I load a csv file

2,275 views
Skip to first unread message

Youssef Mourchid

unread,
Aug 5, 2018, 11:35:53 AM8/5/18
to Neo4j
Hi,

when I was working in the previous version of neo4j (my actual version is 3.2.5) everything was ok, when I want to load my csv file I use this command:

USING PERIODIC COMMIT
LOAD CSV WITH HEADERS FROM "file:///C:/Users/user/Documents/NEWDATANEO4J/myfile.csv" AS line
MERGE (a:Actor{id_actor:line.ID_Actor,name_actor:toString(line.NAME_ACTOR)})

but now after upgrading my neo4j version, it shows me the error "Neo.ClientError.Statement.SemanticError: Cannot merge node using null property value for id_actor"

my csv file is like that:








if anyone can help me with that, I would be very thankful.

Rhianna Tomlinson

unread,
Sep 1, 2018, 8:26:47 PM9/1/18
to Neo4j
Have you tried removing the blank lines in your CSV?

Michael Hunger

unread,
Sep 1, 2018, 8:32:39 PM9/1/18
to ne...@googlegroups.com
Only use the ID and filter out the null names or ids

USING PERIODIC COMMIT
LOAD CSV WITH HEADERS FROM "file:///C:/Users/user/Documents/NEWDATANEO4J/myfile.csv" AS line
WITH line where not line.ID_Actor is null
MERGE (a:Actor{id:line.ID_Actor})
ON CREATE SET a.name=line.NAME_ACTOR

Please join community.neo4j.com and ask there in the cypher category.

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages