Challenge
In this challenge, you will add movie ratings to the graph.
You will create a new node for each User
and a RATED
relationship between the User
and the Movie
nodes.
Data
The data for the node and relationship is stored in a single file, ratings.csv
, which contains the following columns:
-
movieId
: The ID of the movie that the user rated. -
userId
: The user’s ID. -
name
: The user’s name. -
rating
: The user’s rating of the movie. -
timestamp
: The timestamp when the user created the rating.
The User
node should have userId
and name
properties, and the RATED
relationship should have rating
and timestamp
properties.
Process
The process is the same as importing from a single file as it is from multiple files:
-
Upload the
ratings.csv
. -
Create the model for the data, in this case, a
User
node and aRATED
relationship to theMovie
node. -
Map the columns to the model. The node and the relationship will use the same
ratings.csv
file. -
Import the data.
View the data
You can check you have imported the data by running the following query to return User
nodes and the RATED
relationship:
MATCH (u:User)-[r:RATED]->(m:Movie)
RETURN u,r,m
LIMIT 25
Need to download a working solution?
This Data Importer model, person-movie-user-import.zip, contains a working solution for this exercise.
Download the model and open it using the Open model (with data) button
in the …
menu.

Note that this will replace your existing model.
Continue
Summary
In this lesson, you learned how to import multiple nodes and relationships from a single file.
In the next lesson, you will explore the considerations for using Data Importer.