【发布时间】:2020-04-09 09:57:31
【问题描述】:
我正在尝试将数据从 CSV 文件发送到 python 中的 apoc 查询。 我的查询如下所示:
"""
CALL apoc.export.csv.query("MATCH(n:Entity{EntityType:'Configuration_Item', Name:$CI_name}) --(ev:Event)--(c:Common)
optional match (c)--(ev_c:Event)--(en:Entity)
where en.EntityType='Change' or en.EntityType='Interaction'
with en.EntityType as ent,ev_c.Activity as act, en.IDraw as ID, ev.Start as date
order by ev.Start where not ent='null'
return collect(act), ID, ent", "results.csv",{stream:true, params:{CI_Name:$CI_name}})
"""
发送数据的Python代码如下:
with open ('CI.csv','r') as first_file:
csv_f = csv.DictReader(first_file)
for row in csv_f:
counter(row["n.Name"])
但是,我收到以下错误
提高 CypherError.hydrate(*元数据) neobolt.exceptions.ClientError:预期参数:CI_name
你能帮我解决这个问题吗?
谢谢!
【问题讨论】:
标签: python neo4j neo4j-apoc