Created
July 14, 2020 15:41
-
-
Save LeonardoMarrancone/1da927aa9e40a3affa87d31faa0ecbb9 to your computer and use it in GitHub Desktop.
Query to import relationship WATCH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOAD CSV FROM 'file:///shows.csv' AS row | |
WITH row, toInteger(row[0]) as id, row[1] as labels, row[2] as follows, row[3] as name, row[4] as surname, toInteger(row[5]) as start, toInteger(row[6]) as end, row[7] as type, toFloat(row[8]) as rating | |
WHERE type="WATCH" | |
MATCH (u:User) WHERE u.id= start | |
MATCH (s:Show) WHERE s.id= end | |
CREATE (u)-[:WATCH{rating: rating}]->(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment