mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
[bug] Fix CSV upload feature for DB with password (#4562)
* Use sqlalchemy_uri_decrypted in create_engine calls * Update tox mysql uri * Include mysql charset=utf8 for py2.7 in tox.ini
This commit is contained in:
committed by
Maxime Beauchemin
parent
d494c82930
commit
31a995714d
@@ -135,7 +135,7 @@ class BaseEngineSpec(object):
|
||||
'table': table,
|
||||
'df': df,
|
||||
'name': form.name.data,
|
||||
'con': create_engine(form.con.data.sqlalchemy_uri, echo=False),
|
||||
'con': create_engine(form.con.data.sqlalchemy_uri_decrypted, echo=False),
|
||||
'schema': form.schema.data,
|
||||
'if_exists': form.if_exists.data,
|
||||
'index': form.index.data,
|
||||
@@ -875,7 +875,7 @@ class HiveEngineSpec(PrestoEngineSpec):
|
||||
TEXTFILE LOCATION '{location}'
|
||||
tblproperties ('skip.header.line.count'='1')""".format(**locals())
|
||||
logging.info(form.con.data)
|
||||
engine = create_engine(form.con.data.sqlalchemy_uri)
|
||||
engine = create_engine(form.con.data.sqlalchemy_uri_decrypted)
|
||||
engine.execute(sql)
|
||||
|
||||
@classmethod
|
||||
|
||||
2
tox.ini
2
tox.ini
@@ -82,7 +82,7 @@ commands =
|
||||
[testenv:py27-mysql]
|
||||
basepython = python2.7
|
||||
setenv =
|
||||
SUPERSET__SQLALCHEMY_DATABASE_URI = mysql://root@localhost/superset?charset=utf8
|
||||
SUPERSET__SQLALCHEMY_DATABASE_URI = mysql://mysqluser:mysqluserpassword@localhost/superset?charset=utf8
|
||||
|
||||
[testenv:py34-mysql]
|
||||
basepython = python3.4
|
||||
|
||||
Reference in New Issue
Block a user