Importing Data Fundamentals
Import data into Neo4j with confidence. Load CSV files, map relationships, and use Cypher and the Data Importer to build a graph from your own data.
In this 2-hour course, you will learn
Modeling a graph is only half the job. At some point you have to load real data into Neo4j, and the shape of your source files rarely matches the shape of your graph. This course teaches you how to bridge that gap using the Neo4j Full definition for Data Importer (opens in a new tab)The Neo4j tool for loading CSV files into a graph by mapping their columns onto nodes and relationships., a visual tool that maps CSV files to Full definition for node (opens in a new tab)A vertex in a graph. In a property graph it can carry labels and properties., Full definition for relationship (opens in a new tab)A named, directed connection between two nodes. Every relationship has a type, a start node and an end node., and Full definition for property (opens in a new tab)A named value stored on a node or a relationship. without writing any Full definition for Cypher (opens in a new tab)Neo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it..
Over roughly two hours, you will import a set of movie and user rating CSV files into a Neo4j database. Along the way you will create nodes and Full definition for label (opens in a new tab)A tag on a node that groups it with other nodes of the same kind. A node can carry more than one., add properties with the correct data types, define unique IDs backed by Full definition for constraint (opens in a new tab)A rule the database enforces on every node or relationship with a given label or type, rejecting any write that breaks it., add indexes to keep queries fast, and connect your nodes with Full definition for directed relationship (opens in a new tab)A relationship that runs one way, from its start node to its end node. Every relationship Neo4j stores is directed.. You will also step back to inspect your source data and think about what its structure means for the graph you are building.
Who this course is for
This course is for data engineers and developers who need to get data into Neo4j and want a reliable, repeatable way to do it. If you have already modeled a graph, either on paper or in the Graph Data Modeling Fundamentals course, and you now need to turn a folder of CSV files into a running graph, this is where that work becomes concrete.
You do not need to be a Cypher expert. The Data Importer does the heavy lifting through a visual interface, so the focus is on understanding how source columns map to graph elements and how to make sensible modeling decisions as you import. If you have ever loaded data into a relational database and want to understand how the same job feels in a graph, you will find the ideas familiar and the approach refreshingly direct.
Prerequisites
You will get the most from this course if you already understand a few Neo4j basics. We recommend completing these three courses first:
- Neo4j Fundamentals introduces nodes, relationships, labels, and properties. You need this vocabulary to describe what the importer is creating for you.
- Cypher Fundamentals teaches you to read and write basic queries. Even though the Data Importer writes Cypher on your behalf, being able to query the result lets you confirm the import worked as intended.
- Graph Data Modeling Fundamentals covers how to design a graph model from a set of requirements. Importing is the point where your model meets real data, so understanding why the model looks the way it does will help you make good mapping decisions.
If you are comfortable with these concepts already, you can move straight into the course.
What you'll build and do
This is a hands-on course built around a single practical task: importing a movie dataset into Neo4j from CSV.
You will open the Neo4j Data Importer, load a set of CSV files, and map their columns onto a graph model. You will create Movie nodes and give them properties with explicit data types, so numbers are stored as numbers and dates as dates rather than everything landing as a string. You will set a unique ID for each node and back it with a uniqueness constraint, which both guarantees data integrity and gives the importer an anchor to match rows against. You will add an index to speed up the lookups your queries will rely on.
With your nodes in place, you will create relationships between them, including a directed relationship that captures how one node relates to another, and you will import user rating data that connects people to the movies they have watched. By the end you will have taken a folder of flat files and produced a connected graph you can query. The same workflow scales to your own data, so the skills transfer directly to real projects.
Module by module
The course is organized into two modules that move from concepts to practice.
Importing data into Neo4j
The first module orients you before you touch the tool. You will get started with the course environment, then work through an overview of the different ways to import data into Neo4j and when each one fits. The Data Importer is the visual, no-code option and the focus of this course, but it is not the only choice. LOAD CSV runs from within Cypher and is well suited to scripted, repeatable imports. The official drivers let you push data from an application in Java, Python, JavaScript, and other languages. The neo4j-admin database import command performs a fast bulk load of very large datasets into an offline database. Understanding this landscape helps you pick the right tool for a given job rather than forcing every import through the same door. The module closes with a look at the tools you will use throughout the rest of the course.
Neo4j Import tool (Data Importer)
The second module is where you do the work. You will open the Import tool and learn how its interface maps source files onto a graph. You will look at properties and types, understanding why assigning the correct type to each property matters for storage and for the queries you write later. From there you add Movie nodes from your CSV data, then define unique IDs and add the constraints that enforce them, which is also what lets the importer reliably match and update rows. You will create relationships to connect your nodes, add a directed relationship so the graph captures the direction of a connection, and finally import user ratings to link people to the movies they rated. Each step builds on the last, so by the end you have a complete, connected graph assembled entirely through the tool.
Where to go next
The Data Importer is a great starting point, and there are other approaches worth knowing once you are comfortable with it. Continue with:
- Importing CSV data into Neo4j shows you how to import data using Cypher directly, giving you finer control than the visual tool and a path to scripting your imports.
- LOAD CSV Data Import goes deep on the
LOAD CSVclause, including how to handle larger files, transform values during import, and manage Full definition for transaction (opens in a new tab)A unit of work that either succeeds in full or leaves no trace..
Importing is also a topic on the exam for the Neo4j Certified Professional certification, so the skills you build here count toward earning that credential.
Importing data into Neo4j
Options for importing data
Using Neo4j Import tool
3 modules, 2 hours.
Posts from the GraphAcademy blog.
My five favorite cards in Aura Dashboards
When Dashboards first became available in Aura, I started to move my reporting away from custom tools. Here are the five cards I use the most, and a Cypher statement behind them.
SQL to Cypher - 10 Queries You Already Know
You already know how to write these queries. This article shows you what they look like when the joins go away.
Writing Cypher Queries That Don't Lose Your Data
The query trap that hides your newest data, and the query shape that brings it back.