精华 load csv 处理NULL字段
发布于 7 年前 作者 pangguoming 4761 次浏览 来自 分享

在CSV文件中有些字段是空的NULL,我们在用load csv时可以判断下再做处理 例如: LOAD CSV WITH HEADERS from “file” as line WITH line , case when line.FirstNodeID is not null then [line] else [] end as NodeOneID , case when line.SecondNodeID is not null then [line] else [] end as NodeTwoID foreach(x in NodeOneID | CREATE (n1:NodeOne { ID : x.FirstNodeID })) foreach(x in NodeTwoID | CREATE (n2:NodeTwo { ID : x.SecondNodeID }))

回到顶部