1
votes

I'm at a loss, have installed Neo4j Desktop multiple times and cannot get it to load a CSV file. It's hard to know where to begin. None of the online documentation, or examples seem to be even relevant.

Loading from the browser using this code:

USING PERIODIC COMMIT
LOAD CSV WITH HEADERS FROM "file:///GraphElements.nodes.csv" AS row
CREATE (:Type {name: row.Name, uuid: row.UUID});

results in this error:

Neo.ClientError.Statement.ExternalResourceFailed: Couldn't load the external resource at: file:/GraphElements.nodes.csv

enter image description here

According all the doc I've been able to find Neo4j looks for the file in its import folder, but where's the import folder supposed to be?

Neo4j was installed at: C:\Program Files\Neo4j Desktop
Note: 'Neo4j Desktop.exe' is in this folder, there is no bin folder

I created an import folder immediately below, i.e. C:\Program Files\Neo4j Desktop\import
and put the CSV file there. No luck, same error.

Rummaging around, I find:

C:\Users\CTG\.Neo4jDesktop

with some likely looking subfolders:

C:\Users\CTG\.Neo4jDesktop\neo4jDatabases\database-2c020f68-86a8-439d-937e-b5b46ad7f629
C:\Users\CTG\.Neo4jDesktop\neo4jDatabases\database-0541f039-2dfa-4c4d-85da-2c213b54d0c7
C:\Users\CTG\.Neo4jDesktop\neo4jDatabases\database-35274b1f-3b7b-42d3-83f1-06b881147e90

each of these has a bin folder a couple of levels down. I've created an import folder under each of these, and copied the CSV file into them. Still get the problem.

Does anybody have any idea what's going on?

FWIW, the Neo4j doc doesn't seem to be up to date vis-a-vis Desktop. The current Operations manual here only mentions Community and Enterprise editions, nothing about Desktop. The File Locations reference claims that the default import location is at:

%APPDATA%\Neo4j Community Edition\import

but I cannot find a 'Neo4j Community Edition' folder. And the Community Edition seems to be gone from their site.

At this point Neo4j is only useful to play around with.

Thanks in advance for any clarification or help.

2

2 Answers

0
votes

The import folder should be relative to the Neo4j instance in question.

If you Manage an instance in the Desktop app, you will see some buttons near the top. One of them is "Open Folder" with a dropdown menu. The dropdown has the option to open the Import folder for that instance.

0
votes

This is what worked on Windows 10: LOAD CSV FROM "file:///c:/Users/joe/Documents/sample.csv/" AS line RETURN count(*);

Go to the configuration file found here: C:\Users\joe.Neo4jDesktop\neo4jDatabases\database-415cd6e1-0a1b-4973-ab3d-c32280b8a72b\installation-3.4.1\conf Then change the conf file line 25 by commenting it out #dbms.directories.import=import