gpt4 book ai didi

Neo4j APOC 将 CSV 导出到特定目录

转载 作者:行者123 更新时间:2023-12-04 21:58:33 25 4
gpt4 key购买 nike

以下查询对我来说很好

CALL apoc.export.csv.query("MATCH (a:Person)
RETURN a.name AS name", "result.csv", {})

但我想将结果导出到特定目录,例如“test”目录 /neo4j-community-3.2.6/test/result.csv

测试目录存在于neo4j-community-3.2.6文件夹中,但是查询

CALL apoc.export.csv.query("
MATCH (a:Person)
RETURN a.name AS name",
"/test/result.csv", {})

给我以下错误:

Neo.ClientError.Procedure.ProcedureCallFailed Failed to invoke procedure apoc.export.csv.query: Caused by: java.io.FileNotFoundException: \test\result.csv (The system cannot find the path specified)

有人能帮忙吗?

最佳答案

解决了。我从用户“tomasi”的“neo4j-users.slack.com”获得了帮助。为此,我们需要在参数中提供完整路径:

CALL apoc.export.csv.query("MATCH (a:Person)
RETURN a.name AS name",
"/home/xyzuser/neo4j-community-3.2.6/test/result.csv", {})

关于Neo4j APOC 将 CSV 导出到特定目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46734159/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com