diff --git a/superset/models.py b/superset/models.py index 9a4d18121aaaa..81e251d6bc569 100644 --- a/superset/models.py +++ b/superset/models.py @@ -1320,15 +1320,8 @@ def query( # sqla for s in columns: select_exprs.append(cols[s].sqla_col) metrics_exprs = [] - elif not is_timeseries: - # use all columns if none were specified - for col_obj in cols.values(): - select_exprs.append(col_obj.sqla_col) - metrics_exprs = [] - row_limit = row_limit or 100 if granularity: - @compiles(ColumnClause) def visit_column(element, compiler, **kw): """Patch for sqlalchemy bug diff --git a/superset/viz.py b/superset/viz.py index 1fe04a75f8524..eaf5a63740883 100755 --- a/superset/viz.py +++ b/superset/viz.py @@ -269,7 +269,7 @@ def query_obj(self): """Building a query object""" form_data = self.form_data groupby = form_data.get("groupby") or [] - metrics = form_data.get("metrics") or [] + metrics = form_data.get("metrics") or ['count'] extra_filters = self.get_extra_filters() granularity = ( form_data.get("granularity") or form_data.get("granularity_sqla")