Neo4J Load CSV -> URI is not hierarchical

前端 未结 10 1804
无人共我
无人共我 2021-02-20 10:39

I try to import CSV in a Neo4j Database and I have a problem.

On my desktop computer (windows 7, java 1.8.0_40-b25), the LOAD CSV works great. But on the server (window

10条回答
  •  無奈伤痛
    2021-02-20 11:27

    As specified above once you try with

    USING PERIODIC COMMIT
    LOAD CSV WITH HEADERS FROM "file:///E:/AdventureWorks/adventureworks-neo4j/data/products.csv" as row
    CREATE (:Product {productName: row.ProductName, productNumber: row.ProductNumber, productId: row.ProductID, modelName: row.ProductModelName, standardCost: row.StandardCost, listPrice: row.ListPrice});
    

    The "URI is not hierarchical" error disappears. Then most probably you will get an error saying that it couldnt load the resource like

    TransientError.Statement.ExternalResourceFailure
    

    In order to solve the same you should find the neo4j.conf file.

    Since i'm using a windows 10 machine and community edition of neo4j i could find the same in the below path.

    C:\Users\{username}\AppData\Roaming\Neo4j Community Edition
    

    Edit the conf file and comment out the line

    dbms.directories.import=import
    

    Doing the above steps enabled me to load the csv file.

提交回复
热议问题