LOAD CSV Data Import
Import data from CSV files into Neo4j using LOAD CSV, creating nodes, relationships, and handling data type conversions
In this 40-minute lab, you will learn
Every graph starts with data, and in many real-world scenarios that data lives in CSV files —exports from relational databases, spreadsheets, or third-party systems. In this lab, you will take raw CSV files and turn them into a connected graph inside an empty Neo4j database.
You will start by learning how the LOAD CSV clause reads and processes rows, then progressively build up a complete import pipeline. Along the way, you will create nodes with correct data types, connect them with relationships using foreign key patterns, and design your imports so they can be safely re-run without creating duplicate data.
By the end of this lab, your database will contain movies, people, and the roles they played —all imported from flat files using only Cypher.
LOAD CSV fundamentals
Read CSV files, inspect headers, and understand how Neo4j processes rows.
Data type conversions
Convert CSV string values to integers, floats, and lists using built-in Cypher functions.
Creating relationships from CSV
Use MATCH and MERGE patterns to connect nodes from separate CSV sources.
Idempotent import pipelines
Design imports that can be safely re-run without creating duplicates.
Error handling and missing data
Filter out incomplete rows, handle null values with coalesce, and batch large imports for resilience.