superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Don't use fully qualified column names in metric definitions (#4101)
Date Tue, 09 Jan 2018 06:03:40 GMT
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 <maximebeauchemin@gmail.com>
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
['"commits@superset.apache.org" <commits@superset.apache.org>'].

Mime
View raw message