mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
Cast raw 'fetch_values_predicate' to Sqlalchemy Text (#9643)
Issue https://github.com/apache/incubator-superset/issues/9642
This commit is contained in:
@@ -601,7 +601,7 @@ class SqlaTable(Model, BaseDatasource):
|
||||
|
||||
if self.fetch_values_predicate:
|
||||
tp = self.get_template_processor()
|
||||
qry = qry.where(tp.process_template(self.fetch_values_predicate))
|
||||
qry = qry.where(text(tp.process_template(self.fetch_values_predicate)))
|
||||
|
||||
engine = self.database.get_sqla_engine()
|
||||
sql = "{}".format(qry.compile(engine, compile_kwargs={"literal_binds": True}))
|
||||
|
||||
Reference in New Issue
Block a user