Search code examples
memgraphdb

How to import data in .cypherl format to a Memgraph that runs in Docker?


I have a Memgraph installed using docker. I didn't use Memgraph Platform docker image, so I don't have a Memgraph Lab.

I have data in .cypherl format. How can I import it into Memgraph?


Solution

  • The exact procedure/command depends on your operating system. If you are using Linux or macOS your command would be:

    docker run -i --entrypoint=mgconsole memgraph/memgraph-platform --host HOST < queries.cypherl
    

    If you are running Docker under Windows then the command is:

    cmd.exe /c "docker run -i --entrypoint=mgconsole memgraph/memgraph-platform --host HOST < queries.cypherl"
    

    Be sure to replace HOST with valid IP of the container and to define the correct Memgraph Docker image you are using as well as the correct path to the file.