neo4j load csv 处理NULL字段

  Janix520

在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 }))

------你的笑你的泪,是我筑梦路上,最美的太阳。