Forums

apache-superset mutate database names/url

Just had a painful setup of superset on PA and thought I'd share the issue with anyone looking to do the same. Since when using PA the mySQL db names all have a "$" in them you'll notice your queries will fail for many methods (the uri gets coded for urls and thus the $ becomes a %24). To fix this you'll need to include a DB/URL mutator function in the superset_config.json. The simplest fix is this I think

def DB_CONNECTION_MUTATOR(uri, params, username, security_manager, source):  
    uri.database = uri.database.replace('%24', '$')  
    return uri, params

That was painful enough, figured I could save someone a headache

Thanks, @enmet. Maybe you can raise an issue with superset, since it seems to have a problem with valid MySQL database names.

done - #13062 - https://github.com/apache/superset/issues/13062

Thanks, thumbed up :)