Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-04-2019 05:22 AM
Here what i want to do in my windows environment:
// Load Entity1
USING PERIODIC COMMIT
LOAD CSV WITH HEADERS FROM "file:/c:Desktop/Entities/ENTITY1.csv" AS row
CREATE (:Entity1 {entityName: row.entity1});
Here the error I received from the online sandbox:
Neo.ClientError.Statement.ExternalResourceFailed: Couldn't load the external resource at: file:/var/lib/neo4j/import/c:Desktop/Entities/ENTITY1.csv
My question:
Where is my error? Is there somewhere i have to put my file if I want to use this command?
12-04-2019 06:39 AM
Hi Gabriel,
One thing you can do is to put the csv file online, since you don't have access to the neo4j Sandbox directory in this case. See here: https://neo4j.com/developer/guide-import-csv/.
Web-hosted files can be referenced directly with their URL, like
https://host/path/data.csv
. However, permissions must be set so that an external source can read the file. For more information about access related to online file imports, see this knowledge base article.Examples
Example 1 - website
LOAD CSV FROM 'https://neo4j.com/docs/cypher-manual/3.5/csv/artists.csv'
Example 2 - Google
LOAD CSV WITH HEADERS FROM 'https://docs.google.com/spreadsheets/d/<yourFilePath>'
12-04-2019 07:50 AM
this is what I received:
Neo.DatabaseError.General.UnknownError: At https://drive.google.com/open?id=1RQHTS66dJ__J0YPzlHSNjxnGkCo3TWdm @ position 1730 - there's a field starting with a quote and whereas it ends that quote there seems to be characters in that field after that ending quote. That isn't supported. This is what I read: 'docs-fwds":'
But...
I know that I have no quotes in my data and nothing like: docs-fwds. It is just a csv file that i upload in my googledocs.
12-05-2019 05:30 AM
Looks like the issue with google drive is: the link above is not the direct link to your .csv file, but it's a redirect to another page that will open the csv file in your browser, and that's why the docs-fwds error comes from. At the moment I couldn't find a way to resolve this issue with google drive either.
There is a solution proposed on stack overflow https://stackoverflow.com/questions/56521828/neo4j-database-error-general-unknown-error but it doesn't work for me when I tested it on my sandbox either.
The only thing that works is when I upload it into my own server (like the Example 1).
04-20-2020 11:16 AM
I try to load a dataset on neo4j desktop from link on githup but it showed me this error
Couldn't load the external resource at: https://github.com/neo4j-graph-analytics/book/raw/master/datatransport-nodes.csv
All the sessions of the conference are now available online