Your challenge is to add the DIRECTED
relationship between the Person
and Movie
nodes.
The directed.csv
file contains the data to match the Person
nodes to the Movie
nodes.
The file contains the following columns:
-
movieId
- The unique identifier of the movie -
person_tmdbId
- the unique identifier of the person who directed the movie
You will need to:
-
Upload the
directed.csv
file -
Create the
DIRECTED
relationship between thePerson
andMovie
nodes -
Set the Node ID mapping
-
Run the import
Once you have imported the data, you can run the following query to view the DIRECTED
relationships:
MATCH (p:Person)-[d:DIRECTED]->(m:Movie)
RETURN p,d,m
LIMIT 25
Validate Results
Once you have imported the DIRECTED
relationship, click the Check Database button to verify that the task is complete.
Hint
Follow the same steps as the previous lesson, where you imported the ACTED_IN
relationship from the acted_in.csv
file.
Solution
This Data Importer model, person-movie-acted_in-directed-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.
Review the model; you will see that a DIRECTED
relationship has been created between the Person
and Movie
nodes.
Run the import to add the DIRECTED
relationships to the graph.
Summary
In this challenge, you used data importer to create a relationship between nodes.
In the next lesson, you will learn how to import data and nodes from a single CSV file.