fix(#23176): adding URL decoding to SQLAlchemy URI (#23421)

Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
RekhaZemoso 2023-04-07 04:11:17 +05:30 committed by GitHub
parent 8ef49a5789
commit 8f0328006b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
import logging
import urllib.parse
from logging.config import fileConfig
from typing import List
@ -42,7 +43,8 @@ if "sqlite" in DATABASE_URI:
"SQLite Database support for metadata databases will \
be removed in a future version of Superset."
)
config.set_main_option("sqlalchemy.url", DATABASE_URI)
decoded_uri = urllib.parse.unquote(DATABASE_URI)
config.set_main_option("sqlalchemy.url", decoded_uri)
target_metadata = Base.metadata # pylint: disable=no-member