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 (windows 2012 R2, java 1.8.0_65-b17), i have this error message "URI is not hierarchical".
I try to put the data on C:, F: ... no change.
Here's the code :
USING PERIODIC COMMIT 100
LOAD CSV WITH HEADERS FROM
"file:F:/Neo4JData/Destination.csv"
AS line
MERGE (d:Destination {`Code`: line.`Code`});
Thanks for your help.
In Neo4j Desktop you can open the folder in your file-manager (explorer, finder, etc) via the UI by clicking on the "Open (Folder)" dropdown or menu. Then place the files there and access them directly from Neo4j. The CSV import developer guide walks through loading local CSV files to Neo4j Desktop.
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
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});
Are you using 2.3.0 Community Edition?
try:
USING PERIODIC COMMIT 10000 LOAD CSV FROM 'file:///F:\\Neo4JData\\Destination.csv
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With