Skip to content

Commit

Permalink
Don't use fully qualified column names in metric definitions (#4101)
Browse files Browse the repository at this point in the history
When generating an auto SUM() metric on a column, Superset currently
will go `SUM(table_name.column_name)`. This is an issue when moving to
point to another table. It's common to work on some temporary table or
work table and eventually need to point Superset to an alternate table.
  • Loading branch information
mistercrunch authored Jan 9, 2018
1 parent d570120 commit b159e51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ def fetch_metadata(self):
if not any_date_col and dbcol.is_time:
any_date_col = col.name

quoted = str(col.compile(dialect=db_dialect))
quoted = col.name
if dbcol.sum:
metrics.append(M(
metric_name='sum__' + dbcol.column_name,
Expand Down

0 comments on commit b159e51

Please sign in to comment.