我尝试执行此命令,但屏幕显示消息:如何解决这个问题?
Invalid input 'UNIQUE': expected "(", "allShortestPaths" or "shortestPath" (line 4, column 8 (offset: 269)) "CREATE UNIQUE(s1)<-[:FROM]->(r)"
初始输入命令:
:auto USING PERIODIC COMMIT 500 load csv with headers from "https://lovecandyhsu.neocities.org/relations.csv" as csvLine MATCH (s1:Station { id: toInteger(csvLine.fromId)}),(r:Route { id: toInt(csvLine.route_informationId)}),(s2:Station { id: toInt(csvLine.toId)}) CREATE UNIQUE(s1)<-[:FROM]->(r) CREATE UNIQUE(r)<-[:TO]->(s2) RETURN csvLine
1条答案
按热度按时间lnxxn5zx1#
“CREATE UNIQUE”子句为deprecated in Neo4j version 3.2
MERGE caluse现在就能做到这一点。
理想情况下,只需将“CREATE UNIQUE”替换为“MERGE”就可以了。