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
Use the path 'file:///F:/Neo4JData/Destination.csv' and add the Destination.csv file to the neo4jDB\import directory.If the import directory is not there create a new directory named as import and add the file.
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.
I had the same problem. I solved it by putting ///
instead of F:/
or F:///
.
So if your source is
F:/FolderOne/FolderTwo/file.csv
It becomes
///FolderOne/FolderTwo/file.csv
Remember that in order to add the file you must put file:
in front of the source.
So finally
file:///FolderOne/FolderTwo/file.csv
Are you using 2.3.0 Community Edition?
try:
USING PERIODIC COMMIT 10000 LOAD CSV FROM 'file:///F:\\Neo4JData\\Destination.csv