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.
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.
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?
How to import data from Cypher queries?
If your data is in the form of Cypher queries (
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.
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.