【问题标题】:How to load external file when using LOAD CSV in neo4j?在 Neo4j 中使用 LOAD CSV 时如何加载外部文件?
【发布时间】:2016-10-24 00:27:44
【问题描述】:

我知道我们可以使用

LOAD CSV WITH HEADERS FROM 'file:///nodes.csv' AS row

在 Neo4j 中,但似乎默认文件夹是当前 Neo4j DB 下的导入目录。如果数据库位于磁盘 D 下,如何使用 LOAD CSV(在 Windows 上)加载磁盘 E 下的 csv 文件?我试过'file:///e:/XXX.csv''file:e:/xxx.csv'。他们都不能工作......

【问题讨论】:

    标签: csv neo4j


    【解决方案1】:

    你会在 neo4j.conf 中找到这样的设置

    # This setting constrains all `LOAD CSV` import files to be under the `import` directory. Remove or uncomment it to
    # allow files to be loaded from anywhere in filesystem; this introduces possible security problems. See the `LOAD CSV`
    # section of the manual for details.
    dbms.directories.import=import
    

    如果您删除/注释它,Neo4j 应该允许从系统中的任何位置加载文件

    【讨论】:

    • 或者您可以将该目录设置为您的源代码
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多