mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Escaping the user's SQL in the explore view (#3186)
* Escaping the user's SQL in the explore view When executing SQL from SQL Lab, we use a lower level API to the database which doesn't require escaping the SQL. When going through the explore view, the stack chain leading to the same method may need escaping depending on how the DBAPI driver is written, and that is the case for Presto (and perhaps other drivers). * Using regex to avoid doubling doubles
This commit is contained in:
committed by
GitHub
parent
fb866a937b
commit
25c599d040
@@ -154,7 +154,6 @@ def execute_sql(ctask, query_id, return_results=True, store_results=False):
|
||||
template_processor = get_template_processor(
|
||||
database=database, query=query)
|
||||
executed_sql = template_processor.process_template(executed_sql)
|
||||
executed_sql = db_engine_spec.sql_preprocessor(executed_sql)
|
||||
except Exception as e:
|
||||
logging.exception(e)
|
||||
msg = "Template rendering failed: " + utils.error_msg_from_exception(e)
|
||||
|
||||
Reference in New Issue
Block a user