I've installed Apache Superset according to this official manual. I can create plots, connect to databases etc. without any problems, only if I want to plot latitude and longitude data with a mapbox or deck.gl plots, I get this warning and can't see any maps:
NO_TOKEN_WARNING For information on setting up your basemap, read Note on Map Tokens
I have a MapBox-Api-Key (lets say XXYYZZ) and followed instructions where I created a superset_config.py file in the home folder of the server where superset is running. This is the code I used:
.bashrcexport SUPERSET_HOME=/home/maximus/envs/superset/lib/python3.6/site-packages/superset export SUPERSET_CONFIG_PATH=$HOME/.superset/superset_config.py export PYTHONPATH=/home/maximus/envs/superset/bin/python:/home/maximus/.superset:$PYTHONPATH
superset_confiy.py in .supersetpath: $ ~/.superset/superset_config.py
with following code
#---------------------------------------------------------
# Superset specific config
#---------------------------------------------------------
ROW_LIMIT = 50000
MAPBOX_API_KEY = 'XXYYZZ'
As I'm using docker, I thought maybe I need to to the same within the main docker container of superset (superset_app) but it still does not work.
My server runs on Ubuntu 18.04 LTS. Anyone any ideas on how to solve this problem with docker, superset and mapbox?
I solved the problem by adding my mapbox token (XXYYZZ) to the docker environment file which is used by docker-compose.
This is what I did in detail:
docker-compose downcd into the docker folder within the folder where the docker-compose files is --> cd superset/docker.env-non-dev file with nano. If you run the "normal" version just edit the .env file instead.Comment: I'm not sure if this is the supposed way, but apparently you can edit the environmental parameters.
docker-compose -f docker-compose-non-dev.yml up -d or docker-compose -f docker-compose.yml up -d respectively.Thats all, I can now see the maps when opening the deck.gl sample dashboard.
The documentation and a youtube video tutorial seem outdated. For the most recent release: clone the superset repo; add the MAPBOX_API_KEY to the superset/config.py or docker/pythonpath_dev/superset_config.py; then docker-compose up solved the problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With