message: Use connector registry for metrics
diff: @@ -1794,6 +1794,7 @@ class Superset(BaseSupersetView):
  is_dim = config.get('is_dim', False)
  SqlaTable = ConnectorRegistry.sources['table']
  TableColumn = SqlaTable.column_cls
  + SqlMetric = SqlaTable.metric_cls
  col = TableColumn(
  column_name=column_name,
  filterable=is_dim,
  @@ -1806,18 +1807,18 @@ class Superset(BaseSupersetView):
  agg = config.get('agg')
  if agg:
  if agg == 'count_distinct':
  - metrics.append(models.SqlMetric(
  + metrics.append(SqlMetric(
  metric_name="{agg}__{column_name}".format(**locals()),
  expression="COUNT(DISTINCT {column_name})"
  .format(**locals()),
  ))
  else:
  - metrics.append(models.SqlMetric(
  + metrics.append(SqlMetric(
  metric_name="{agg}__{column_name}".format(**locals()),
  expression="{agg}({column_name})".format(**locals()),
  ))
  if not metrics:
  - metrics.append(models.SqlMetric(
  + metrics.append(SqlMetric(
  metric_name="count".format(**locals()),
  expression="count(*)".format(**locals()),
  ))
  