Add Directed relationship

Challenge

Your challenge is to add the DIRECTED relationship between the Person and Movie nodes.

a graph showing the DIRECTED relationship

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

Challenge

You will need to:

  1. Upload the directed.csv file

  2. Create the DIRECTED relationship between the Person and Movie nodes

  3. Set the Node ID mapping

  4. Run the import

View the data

Once you have imported the data, you can run the following query to view the DIRECTED relationships:

cypher
MATCH (p:Person)-[d:DIRECTED]->(m:Movie)
RETURN p,d,m
LIMIT 25
A graph showing the DIRECTED relationship between the Person and Movie nodes
Need to download a working 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.

The Open model (with data) button highlighted in the menu.

Note that this will replace your existing model.

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.