question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple SQL metrics with auto-generated labels are collapsed into one

See original GitHub issue

When creating a chart and adding multiple “custom SQL” metrics, the frontend seems to truncate them to generate the label. If this truncated label is not unique, then only one of the several metrics will be displayed.

I frequently create multiple metrics like:

SUM(vaccinations) FILTER (WHERE agegroup<=17)
SUM(vaccinations) FILTER (WHERE agegroup BETWEEN 18 AND 39)
SUM(vaccinations) FILTER (WHERE agegroup BETWEEN 40 AND 59)
SUM(vaccinations) FILTER (WHERE agegroup>=60)

All of these will have the same generated label SUM(vaccinations) FILTER (WHERE agegroup...

Workaround

Manually adding distinct labels solves this issue. That’s a good idea in any case, but a bit extra work when prototyping.

Expected results

If I add multiple metrics, I want to see multiple metrics in the resulting graph.

Actual results

Only one of many metrics is displayed.

Screenshots

image

How to reproduce the bug

  1. Create new chart.
  2. Add multiple “custom SQL” metrics with identical first 40 characters.
  3. Run

Environment

(please complete the following information):

  • superset version: 0.0.0dev; git hash 80c39daa85c9be9e66a2e3cf2c9e2a8e5a74a8d6
  • python version: 3.9.6
  • node.js version: 16.8.0
  • any feature flags active: (no, using default config)

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven’t found one similar.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
villebrocommented, Sep 1, 2021

FYI @intgr, I know @geido has done some great related work, so you can check his PRs or potentially reach out to him for guidance.

0reactions
rumbincommented, Apr 18, 2022

This issue should not be closed by the stale bot, in my eyes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NetSuite Applications Suite - Using Auto-Generated ...
Cloud · Cloud Applications · NetSuite. NetSuite Applications Suite. Table of Contents; Search. Contents. Expand AllCollapse All.
Read more >
Code Outlining - SQL Server Management Studio (SSMS)
Learn how to use the code outlining feature in the SQL Server Management ... Regions of the code can be collapsed to hide...
Read more >
Create self monitoring dashboard for our Omnibus users
This issue is to discuss building a self monitoring default dashboard using the default metrics that are available in the core Gitlab ...
Read more >
Work with Data Fields in the Data Pane - Tableau Help
These include: aggregated calculations, calculations that use fields from multiple tables, Measure Names, and Measure Values. Below the data source connections ...
Read more >
Chapter 11. Red Hat Single Sign-On Operator
An Install page opens. Operator Install page on OpenShift. operator olm installation. Click Install . Select a namespace and click Subscribe.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found