superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-superset] willbarrett commented on a change in pull request #9764: feat: add replace option to hive csv upload
Date Tue, 19 May 2020 20:57:51 GMT

willbarrett commented on a change in pull request #9764:
URL: https://github.com/apache/incubator-superset/pull/9764#discussion_r427595436



##########
File path: superset/db_engine_specs/hive.py
##########
@@ -179,11 +193,15 @@ def convert_to_hive_type(col_type: str) -> str:
             bucket_path,
             os.path.join(upload_prefix, table_name, os.path.basename(filename)),
         )
+        engine = cls.get_engine(database)
+
+        if if_exists == "replace":
+            engine.execute(f"DROP TABLE IF EXISTS {full_table_name}")

Review comment:
       Yeah, this is scary. Let's see if we can explore some of the possible solutions for
this to get around adding another instance of SQL injection vulnerability.




----------------------------------------------------------------
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



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


Mime
View raw message