Loading your local files in TerminusDB

We have got lot’s of feedback since we have posted our tutorial — My First TerminusDB Graph Visualisation. One of the most common questions is how to load a local CSV in the hard drive into your TerminusDB running in a local docker container. So here is how to do it.


This content is a little dated and applies to TerminusDB Version 4. We’ve moved on quite a bit since then, check out our docs site for the latest tutorials and guidance. TerminusDB & TerminusX which is version 10, combines the power of knowledge graphs, with the simplicity of documents. Build apps and insights with the safety of version control, combined with the ability to create a vibrant knowledge graph of connected JSON documents. Visit our home page for more info.

If your container is running stop it with:

./terminusdb-container stop

Extra tip: you may want to run ./terminusdb-container rm-config now before you mount the volume. This remove old settings to advoid version conflits that may comes in later if there’s a newer version of Docker image avaliable.

set the TERMINUSDB_LOCAL environment variable to the path to the parent directory of your csv:

export TERMINUSDB_LOCAL=/home/me/somewhere

for Windows users:

export TERMINUSDB_LOCAL=c:/Users/you/somewhere

Go to Docker Desktop Settings and make sure that the Drive (i.e. ‘C’) your file on is enabled in Shared Drives

Windows setup Make sure the ‘C’ is clicked and ‘Apply’

then start your container again:

./terminusdb-container run

now, TERMINUSDB_LOCAL will be mounted as /app/local_files so, in your WOQL query, you can use: .file(/app/local_files/myfilename.csv) instead of .remote()


Hope it helps with lot’s of you who want to load csv locally. Thanks Dmytri Kleiner for figuring it out!


Have your say, leave a comment