Import dataset

This tutorial is based on the recommendations dataset, so the first step is to import its dump file into your Neo4j instance. You can import the dump file both into a self-managed DBMS instance and into an Aura instance.

Neo4j Aura

To import the recommendations dataset on an Aura instance, download the file recommendations-50.dump and upload it into the Import Database tab of your instance. For more information, see Aura → Import database.

After the import completes, go on to set up your environment.

Neo4j DBMS

To import the recommendations dataset on a self-managed instance, download the file recommendations-50.dump and place it in the directory where Neo4j is running from (use docker cp to copy it to a Neo4j Docker container).

List of Neo4j directory files with recommendations-50.dump
neo4j@2f446f86ce6a:~$ ls
LICENSE.txt   bin	    labs      packaging_info
LICENSES.txt  certificates  lib       plugins
NOTICE.txt    conf	    licenses  products
README.txt    data	    logs      recommendations-50.dump
UPGRADE.txt   import	    metrics   run

If working with a Neo4j Docker container, ensure you connect to it with the user neo4j before issuing import commands, or you will get permission issues after the import.

docker container exec -u neo4j -it <containerName> /bin/bash

To import the dataset, use the neo4j-admin database load command and create a new database with the same name as the dump file.

bin/neo4j-admin database load recommendations-50 --from-path=./
bin/cypher-shell -u neo4j -p <databasePassword> -d system 'CREATE DATABASE `recommendations-50` WAIT'

To verify that the import was successful, check that the count for Movie nodes is 9125.

bin/cypher-shell -u neo4j -p <databasePassword> -d recommendations-50 'MATCH (:Movie) RETURN count(*)'
+----------+
| count(*) |
+----------+
| 9125     |
+----------+

Now continue to set up your environment.

Glossary

Aura

Aura is Neo4j’s fully managed cloud service. It comes with both free and paid plans.

Cypher

Cypher is Neo4j’s graph query language that lets you retrieve data from the database. It is like SQL, but for graphs.