Data migration
Where is the data you want to migrate?
- CSV files
- JSON files
- CYPHERL files
- Neo4j
- Data from an application or a program
- Relational database management system (MySQL, SQL Server, Oracle)
- In a stream
- Parquet, ORC or IPC/Feather/Arrow file
- NetworkX, PyG or DGL graph
If you can choose the format of the data you want to import, the fastest way to import data into Memgraph is from a CSV file using the LOAD CSV clause. Learn more about the shortest path to import data into Memgraph by reading best practices for import.
Memgraph's office hours
Schedule a 30 min session with one of our engineers to discuss how Memgraph fits with your architecture. Our engineers are highly experienced in helping companies of all sizes to integrate and get the most out of Memgraph in their projects. Talk to us about data modeling, optimizing queries, defining infrastructure requirements or migrating from your existing graph database. No nonsense or sales pitch, just tech.
CSV files
To import data from CSV files into Memgraph, use the LOAD CSV clause, which is used as a standard Cypher clause, and can be invoked straight from a running Memgraph instance.
JSON files
You can import data from a JSON file into Memgraph
by using the json_util
query
module, which contains
procedures for loading JSON file from a local file and from a remote address.
You can also use the import_util.json
procedure to
import data from a local JSON file, but the file needs to in a specific format
defined by the procedure.
CYPHERL files
If your data is in the form of Cypher queries (CREATE
and MERGE
clauses)
within a CYPHERL file it can be imported via Memgraph
Lab or mgconsole.
Neo4j
Export the data into a CSV file and import it into Memgraph using the LOAD CSV clause, like in this example.
Data from an application or a program
Memgraph offers a wide range of client libraries that can be used to connect directly to the platform and import data.
Relational database management systems
Ideally, export data into a CSV file, remodeled the data and rewrite the CSV file, then import it into Memgraph using the LOAD CSV clause, like in this example.
Alternatively, you can use the migration
module from the MAGE graph
library which allows you to access data from a MySQL database, an SQL Server or
an Oracle database.
Data from a stream
Memgraph comes with full streaming support, and you can connect directly to a Kafka, Redpanda or Pulsar stream using Cypher queries or Memgraph Lab.
Parquet, ORC or IPC/Feather/Arrow file
If you are a Python user you can import Parquet, ORC or IPC/Feather/Arrow file into Memgraph using GQLAlchemy (opens in a new tab).
NetworkX, PyG or DGL graph
If you are a Python user you can import NetworkX, PyG or DGL graph into Memgraph using GQLAlchemy (opens in a new tab).