diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py index c8ee40269c599..0f1640dc48c04 100644 --- a/superset/connectors/sqla/models.py +++ b/superset/connectors/sqla/models.py @@ -477,6 +477,9 @@ def get_sqla_query( # sqla 'metrics': metrics, 'row_limit': row_limit, 'to_dttm': to_dttm, + 'filter': filter, + 'columns': {col.column_name: col for col in self.columns}, + } template_processor = self.get_template_processor(**template_kwargs) db_engine_spec = self.database.db_engine_spec diff --git a/superset/viz.py b/superset/viz.py index af8a149e28078..7d0fabb9211d3 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -279,6 +279,8 @@ def query_obj(self): @property def cache_timeout(self): + if self.form_data.get('cache_timeout'): + return int(self.form_data.get('cache_timeout')) if self.datasource.cache_timeout: return self.datasource.cache_timeout if (