Skip to main content
Version: 2.3.1

Import data

There are a few methods for importing data into Memgraph and they cover:

How to import CSV files into Memgraph?

The easiest way to import data into Memgraph is to use the LOAD CSV clause, which is used as a standard Cypher clause, and can be invoked straight from a running Memgraph instance.

LOADCSVClause#LOADCSVClause#LOADCSVClause#LOADCSVClause#

How to import JSON files into Memgraph?

You can import the JSON file into Memgraph by using the JSON query module , which has procedures for loading JSON file from local file or remote address.

LoadJSONLoadJSONLoadJSONLoadJSON

How to import streaming data from Kafka into Memgraph?

Memgraph comes with full streaming support, and you can connect Memgraph directly to a Kafka stream. Check out this guide to find out how to connect to a Kafka stream and take a look at the examples with different serialization mechanisms:

How to migrate data from a relational database?

You can migrate data from a MySQL or PostgreSQL database using the mgmigrate tool.

MySQLMySQLMySQLMySQLPostgreSQLPostgreSQLPostgreSQLPostgreSQL

How to import data from Cypher queries?

If your data is in the form of Cypher queries (CREATE and MERGE clauses) you can import it by using the mgconsole tool or Memgraph Lab. We refer to this format as .cypherl and you can find an example of how to import such data here.

cypherlcypherlcypherlcypherl

How to import data directly from an application/program?

Memgraph offers a wide range of drivers that can be used to connect directly to the platform. You can find a list of all the supported connection methods here.

Where to next?

To learn more about the Cypher language, visit the Cypher manual or Memgraph Playground for interactive guides. For real-world examples of how to use Memgraph, we strongly suggest going through one of the available Tutorials. Details on what can be stored in Memgraph can be found in the article about Data storage.