mistercrunch edited a comment on issue #9045:
URL:
https://github.com/apache/incubator-superset/issues/9045#issuecomment-636429672
@willbarrett, @gbrian is not referring to `SQLALCHEMY_DATABASE_URI`, but to
the ones ones that we encrypt and store in the database.
I'm not sure how well that is documented, but with `DB_CONNECTION_MUTATOR`
(a configuration hook) you can intercept the `Database` at runtime and do
whatever, meaning you can put in bogus username/password in the database, and
your `DB_CONNECTION_MUTATOR` function can read an env var and replace the
proper value.
```python
# in your superset_config.py
def DB_CONNECTION_MUTATOR(sqlalchemy_url, params, effective_username,
security_manager, source):
# Assuming that by convention your `sqlalchemy_url` references the env
var you want to use
sqlalchemy_url = os.environ.get(sqlalchemy_url)
return sqlalchemy_url, params
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]