Search code examples
neo4jload-csv

Neo4j LOAD CSV not working when I use link from github


I have this piece of code which loads a csv from another site.

LOAD CSV FROM 'https://www.quackit.com/neo4j/tutorial/genres.csv' AS line
CREATE (:Genre { GenreId: line[0], Name: line[1]})

enter image description here

But when I upload the same csv to my github account and try it, it gives me an error.

LOAD CSV FROM 'https://www.quackit.com/neo4j/tutorial/genres.csv' AS line
CREATE (:Genre { GenreId: line[0], Name: line[1]})[![enter image description here][2]][2]

enter image description here I only changed the link and nothing else. How do I resolve this?


Solution

  • You need to use the RAW version of the file.

    On your github repo, click on your genres.csv file and then click on RAW

    enter image description here

    Then copy the url and use it in your LOAD CSV command :

    https://raw.githubusercontent.com/JP-Reddy/Recommendation-Engine/master/genres.csv