mistercrunch closed pull request #4562: [bug] Fix CSV upload feature for DB 
with password
URL: https://github.com/apache/incubator-superset/pull/4562
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py
index 6c21206a3c..73f8677293 100644
--- a/superset/db_engine_specs.py
+++ b/superset/db_engine_specs.py
@@ -135,7 +135,7 @@ def _allowed_file(filename):
             '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 @@ def get_column_names(filepath):
             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
diff --git a/tox.ini b/tox.ini
index efdb8aba74..8f226c67c4 100644
--- a/tox.ini
+++ b/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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to