This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new b159e51 Don't use fully qualified column names in metric definitions
(#4101)
b159e51 is described below
commit b159e517876a9313cce07caf0605bed4df1fea58
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Mon Jan 8 22:03:37 2018 -0800
Don't use fully qualified column names in metric definitions (#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.
---
superset/connectors/sqla/models.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset/connectors/sqla/models.py
b/superset/connectors/sqla/models.py
index 889aea3..8ac6e82 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -706,7 +706,7 @@ class SqlaTable(Model, BaseDatasource):
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,
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].