【问题标题】:export to csv from neo4j using import-cypher使用 import-cypher 从 neo4j 导出到 csv
【发布时间】:2015-09-21 10:32:03
【问题描述】:

我发现了这个 neo4j 数据导出工具 (https://github.com/jexp/neo4j-shell-tools#cypher-import),它在我的 mac OS 计算机上运行良好。我按照相同的步骤从 ubuntu 服务器导出数据,生成了以下错误消息,没有进一步解释。

有没有人在 ubuntu 上使用过这个工具,并且知道错误消息可能表明什么?此外,还有另一种方法可以将大型(约 1 亿行)neo4j 数据导出到 csv 文件中吗?

neo4j-sh (?)$ import-cypher -d"," -o test.csv match (p:Product)-[s:SIMILAR_TO]-(q:Product)  return p.Id,q.Id limit 10
Query: match (p:Product)-[s:SIMILAR_TO]-(q:Product)  return p.Id,q.Id limit 10 infile (none) delim ',' quoted false outfile test.csv batch-size 1000
Error occurred in server thread; nested exception is: 
java.lang.NoSuchMethodError: org.neo4j.graphdb.GraphDatabaseService.execute(Ljava/lang/String;)Lorg/neo4j/graphdb/Result;

【问题讨论】:

  • neo4j-shell 的版本是否与服务器上运行的版本匹配?
  • 啊,就是这样!谢谢。

标签: neo4j cypher


【解决方案1】:

我刚刚添加了一种将数据导出为密码语句的新方法。

https://github.com/jexp/neo4j-shell-tools#cypher-export

(注意这是针对 Neo4j 2.2.5)

但对于 100M 行,我认为 import-cypher -o 仍然是一个好方法。

否则退房:http://neo4j.com/blog/export-csv-from-neo4j-curl-cypher-jq/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-17
    • 1970-01-01
    相关资源
    最近更新 更多