You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/11/14 18:35:33 UTC

[GitHub] [incubator-superset] willbarrett commented on a change in pull request #8561: [fix] csv upload param formatting in create engine

willbarrett commented on a change in pull request #8561: [fix] csv upload param formatting in create engine
URL: https://github.com/apache/incubator-superset/pull/8561#discussion_r346478859
 
 

 ##########
 File path: superset/db_engine_specs/base.py
 ##########
 @@ -422,10 +435,13 @@ def _allowed_file(filename: str) -> bool:
         }
         df = cls.csv_to_df(**csv_to_df_kwargs)
 
+        sqla_uri = form.con.data.sqlalchemy_uri_decrypted
         df_to_sql_kwargs = {
             "df": df,
             "name": form.name.data,
-            "con": create_engine(form.con.data.sqlalchemy_uri_decrypted, echo=False),
+            "con": create_engine(
+                sqla_uri, echo=False, paramstyle=cls.dialect_paramstyle(sqla_uri)
 
 Review comment:
   I'm wondering if this will subtly break CSV upload for non-Postgres databases. I wonder if we should retain the previous behavior in `db_engine_specs/base.py` and override the `dialect_paramstyle` function for the Postgres driver?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org