以下是我自己的理解,若有误请批评指正:
执行语句:
LOAD CSV WITH HEADERS FROM "file:///accident.csv" AS line
MERGE (p:accident{id:line.id,name:line.code,casualty:line.casualty})
出现错误:
Cannot merge the following node because of null property value for 'casualty': (:accident {casualty: null}) (Failure when processing file '/E:/Program/...../neo4j-community-4.4.8/import/accident.csv' on line 2.)
原因:在第一次创建实体,而该文件中的casualty值为空。
解决办法:将merge改为create
帮助网址:Explanation of error "Cannot merge node using null property value for" - Knowledge Base