When I try to do it using the local filepath, I get the same error, even though I've placed the file in the correct import directory within my project.
I found an article that said to enable this setting: dbms.security.allow_csv_import_from_file_urls=true, but this doesn't appear to allow me to import from the filepath.
Disclaimer: I am on a Mac. Shouldn't make a difference. If you are using Neo4j Desktop, your settings should be the same as mine. I ran the following command with no changes to the original settings and it produced a list of records:
LOAD CSV WITH HEADERS FROM 'http://data.neo4j.com/intro-neo4j/actors.csv' AS row
WITH row RETURN row
It looks like I needed to enable both settings in order to import from the import directory, which is now working perfectly. My guess on why I can't access the online resource is that my company has a firewall that's preventing me from connecting. I'll try it again on my home wifi and see if that works.
Here's the code block I'm using
LOAD CSV WITH HEADERS
FROM 'http://data.neo4j.com/intro-neo4j/actors.csv'
AS line
RETURN line.id, line.name, line.birthYear
And here's the error that comes back (after a few seconds):
Can you download the CSV from a Web browser? Is it possible that you have a firewall that is preventing that location from being accessed?
If you can download the CSV from data.neo4j.com, you can also place the file in the import folder of your project and use the file:// syntax to read the data locally.
Yup, I was able to download the file and stick it in the import directory. That worked! Still not sure what the issue was with the original query, but at least I can feed in my data. Thank you!