将数据从csv文件加载到neo4j时,我正在使用以下密码查询。
Load csv from
"file:///resume" AS row
FIELDTERMINATOR
'\u0001'
WITH
row, split(row[4], "|") AS pskills ,
split(row[5], "|") As frameworks,
split(row[6], "|") As databases,
UNWIND
pskills AS lang
UNWIND
frameworks AS fw
UNWIND
databases As db
MERGE
(p1:Person {name: row[1],id:row[0]})
MERGE
(p2:Skill:language {name: lang})
MERGE
(p3:Skill:framework {name: fw})
MERGE
(p4:Skill:database {name: db})
MERGE
(p1)-[:SKILLED_IN]->(p2)
MERGE
(p1)-[:SKILLED_IN]->(p3)
MERGE
(p1)-[:SKILLED_IN]->(p4);
出现错误:
Neo.ClientError.Statement.SyntaxError:无效的输入“ p”:预期 空格,注释,“ {”,节点标签,MapLiteral,参数, 关系模式'(','。','[',“ =〜”,IN,STARTS,ENDS,CONTAINS, IS,'^','*','/','%','+','-','=','〜',“ <>”,“!=”,'<','> ', “ <=”,“> =”,AND,XOR,OR,AS,',',ORDER,SKIP,LIMIT,WHERE,FROM 图形,构造,加载CSV,开始,匹配,展开,合并,创建 唯一,创建,设置,删除,删除,前进,带有,调用,返回, UNION,“;”或输入结尾(第5行,第10列(偏移量:189))“ UNWIND pskills AS lang“
答案 0 :(得分:0)
在第一个comma(,)
之前删除多余的UNWIND