mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
[bugfix] text as subquery fails with 'Series Limit' (#1347)
This commit is contained in:
parent
ecb951bb74
commit
8f299448ea
@ -988,7 +988,7 @@ class SqlaTable(Model, Queryable, AuditMixinNullable, ImportMixin):
|
||||
|
||||
# Supporting arbitrary SQL statements in place of tables
|
||||
if self.sql:
|
||||
tbl = text('(' + self.sql + ') as expr_qry ')
|
||||
tbl = TextAsFrom(sqla.text(self.sql), []).alias('expr_qry')
|
||||
|
||||
if not columns:
|
||||
qry = qry.group_by(*groupby_exprs)
|
||||
|
@ -1849,6 +1849,8 @@ class Caravel(BaseCaravelView):
|
||||
'groupby': dims[0].column_name if dims else '',
|
||||
'metrics': metrics[0].metric_name if metrics else '',
|
||||
'metric': metrics[0].metric_name if metrics else '',
|
||||
'since': '100 years ago',
|
||||
'limit': '0',
|
||||
}
|
||||
params = "&".join([k + '=' + v for k, v in params.items()])
|
||||
url = '/caravel/explore/table/{table.id}/?{params}'.format(**locals())
|
||||
|
Loading…
Reference in New Issue
Block a user