Skip to content

Commit

Permalink
Don't use fully qualified column names in metric definitions (apache#…
Browse files Browse the repository at this point in the history
…4101)

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 and michellethomas committed May 23, 2018
1 parent bc60fe4 commit ea19d84
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 ea19d84

Please sign in to comment.