Add a database via superset_config.py script
I'm running superset in a docker container with my config in superset_config.py script. Currently, there's just one database wired to the app which contains superset's default schema. In order to build charts, I'd like to know if there's a way to add a new database via the superset_config.py in a similar manner as we do with the examples database instead of doing so through the UI.
There's no way to add a database on the config (unless you write some code around it). Yet, we will soon implement an API endpoint to support this
After a bit of digging around I found the command superset set_database_uri -d <db_name> -u <db_uri> useful. I'm running it after superset db upgrade and init commands in a bash script within the Superset container and it adds a new database entry for me. Is that okay?
Oh yes, totally forgot that one, yes it's fine