diff --git a/superset/views/core.py b/superset/views/core.py index a6c71a8276c20..80d0e61924540 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -1792,7 +1792,9 @@ def sqllab_viz(self): metrics = [] for column_name, config in data.get('columns').items(): is_dim = config.get('is_dim', False) - col = models.TableColumn( + SqlaTable = ConnectorRegistry.sources['table'] + TableColumn = SqlaTable.column_cls + col = TableColumn( column_name=column_name, filterable=is_dim, groupby=is_dim,