运行 合并语法期间的 Neo4j 问题如何解决?

Neo4j issue during running the merge syntax how can it be solved?

    LOAD CSV WITH HEADERS FROM 
    'file:///epl_mataches.csv' as row 
    MATCH (c1:Club {name:row.`Team1`}), (c2:Club {name:row.`Team2`})
    MERGE (c1) -[f:FEATURED{
        round:toInteger(row.Round),
        date:row.Date,
        homeTeamFTScore: toInteger(split(row.FT,"-" [0])),
        awayTeamFTScore: toInteger(split(row.FT,"-" [1])),
        homeTeamHTScore: toInteger(split(row.HT,"-" [0])),
        awayTeamHTScore: toInteger(split(row.HT,"-" [1]))
    }] -> (c2)

当我尝试创建关系并从数据文件中提取所需信息时出现错误。

Neo.ClientError.Statement.SyntaxError
Type mismatch: expected List<T> but was String (line 7, column 45 (offset: 248))
"    homeTeamFTScore: toInteger(split(row.FT,"-" [0])),"

你的剧本有错别字,所以

homeTeamFTScore: toInteger(split(row.FT,"-" [0])),

下面使用

homeTeamFTScore: toInteger(split(row.FT,"-") [0])

注意 [0] 之前的括号而不是之后的括号。

例如:

RETURN toInteger(split("2-test","-") [0]) as sample

 result:
╒════════╕
│"sample"│
╞════════╡
│ 2      │
└────────┘