Neo4J Load CSV -> URI is not hierarchical

前端 未结 10 1943
无人共我
无人共我 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:07

    Putting the .csv into the $NEO4JHOME/default.graphdb/import directory worked. You may have to create the folder, or maybe uncommenting the dbms.directories.import=import line in conf might do it. I dunno, did it the hard way :)

    However, I found that I still had to include the drive specifier, i.e., file:///c:\csv2import.csv even if it wasn't in the root but in the import directorry

    0 讨论(0)
  • 2021-02-20 11:08

    Try with:

    file:///F:/Neo4JData/Destination.csv
    
    0 讨论(0)
  • 2021-02-20 11:11

    Create an import folder in the default path of the DB and place the file there that helped me.

    For example: C:\Users\XXXXY\Documents\Neo4j\default.graphdb\import and put the csv there. In the query use USING PERIODIC COMMIT LOAD CSV WITH HEADERS FROM "file:///customers.csv" AS row CREATE (:Customer {companyName: row.CompanyName, customerID: row.CustomerID, fax: row.Fax, phone: row.Phone});

    0 讨论(0)
  • 2021-02-20 11:12

    The file path seems wrong, can you try with :

    "file:F:///Neo4JData/Destination.csv"
    
    0 讨论(0)
  • 2021-02-20 11:17

    I was getting this problem as well so what I did was to copy the folder in which the .csv file was present to the following location:

    C:\Users\Username\AppData\Roaming\Neo4j Desktop\Application\neo4jDatabases\database-27badd10-8989-482d-871b-cad746091f07\installation-3.3.3\import\

    it seems when neo4j is installed and we try to import data from files by giving "file:///c://........" then neo4j starts looking for that file in the location C:\Users\Username\AppData\Roaming\Neo4j Desktop\Application\neo4jDatabases\database-27badd10-8989-482d-871b-cad746091f07\installation-3.3.3\import\

    i.e the import folder. So we have to copy all the files needed to be imported by this this type of statement in that import folder.

    0 讨论(0)
  • 2021-02-20 11:18

    Create a folder import under default.graphdb and place your csv files there. Later, you can use file:///fileName.csv in your LOAD CSV query

    0 讨论(0)
提交回复
热议问题