Skip to content

Commit

Permalink
fix(verbose map): Correct raw metrics handling in verbose map (#29417)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdogg17 authored Jan 23, 2025
1 parent fc5dde1 commit 51e090d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,15 @@ def order_by_choices(self) -> list[tuple[str, str]]:
@property
def verbose_map(self) -> dict[str, str]:
verb_map = {"__timestamp": "Time"}
verb_map.update(
{o.metric_name: o.verbose_name or o.metric_name for o in self.metrics}
)
verb_map.update(
{o.column_name: o.verbose_name or o.column_name for o in self.columns}
)

for o in self.metrics:
if o.metric_name not in verb_map:
verb_map[o.metric_name] = o.verbose_name or o.metric_name

for o in self.columns:
if o.column_name not in verb_map:
verb_map[o.column_name] = o.verbose_name or o.column_name

return verb_map

@property
Expand Down

0 comments on commit 51e090d

Please sign in to comment.