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.
If your container is running stop it with:
./terminus-container stop
Extra tip: you may want to run
./terminus-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 TERMINUS_LOCAL
environment variable to the path to the parent directory of your csv:
export TERMINUS_LOCAL=/home/me/somewhere
for Windows users:
export TERMINUS_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
Make sure the ‘C’ is clicked and ‘Apply’
then start your container again:
./terminus-container run
now, TERMINUS_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!
Top comments (0)