Incubator-superset: The error Control labeled "Metrics" cannot be empty should not appear on the first time goes to chart screen by pressing table name

Created on 23 Jul 2019  路  9Comments  路  Source: apache/incubator-superset

The validation works unexpected with my below steps to reproduce

Expected results

The error "Control labeled "Metrics" cannot be empty" should not appear when delete Metrics

Actual results

The error "Control labeled "Metrics" cannot be empty" appears when delete Metrics, but it not happens after refresh page

Screenshots

Screen Shot 2019-07-23 at 5 39 08 PM

How to reproduce the bug

  1. Go to 'Sources/Tables'
  2. Click on 'a table name'
  3. It goes to chart screen, with Table type
  4. Delete Metrics COUNT(*)
    => It's show the error similar to attachment.
  5. Try to select Columns on NOT GROUP BY or anything
    => The error not disappear

  6. Refresh page, and try to delete Metrics COUNT(*) again
    => The error does not appear

Environment

  • superset version: Master branch on 2019, July 23
  • python version: 3.7.3
  • node.js version: 8.16.0
  • npm version: 6.4.1
#bug inactive

Most helpful comment

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.93. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

All 9 comments

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.93. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

This looks like a duplicate of #7363 which has a hint of why this is happening, but was closed due to inactivity

+1 on this. I am able to skirt around the issue by first defining "Not Grouped By" columns, and then clearing the 'Metrics' field.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

+1 on this. I am able to skirt around the issue by first defining "Not Grouped By" columns, and then clearing the 'Metrics' field.

It did not work for me.

Any update on the issue?

+1 on this. I am able to skirt around the issue by first defining "Not Grouped By" columns, and then clearing the 'Metrics' field.

It did not work for me.

@tuhinsharma121 - Try saving first. I have to deal with this on a regular basis. I find saving the chart with the wrong 'metrics' set, then coming back and clearing it sometimes works. I just fiddle around until I get there...

the workaround I found is the following:
1) In the Section "Group By":
fill in the fields
1.a) "Group By" with any available value
1.b) "Metrics" with any available value
2) In the Section "NOT GROUPED BY":
fill in the fields that you target to use ( as "Columns")
3) Click on the button "Run Query" --> error message indicating that you can麓t combine both "Group by " and "NOT GROUPED BY" fields
4) Clear the fields of the section "Group by" --> keep only the target fields
5) Click on the button "Run Query" --> OK

I found out that changing Visualization Type forth and back to Table clear the error for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

john-bodley picture john-bodley  路  3Comments

lenguyenthedat picture lenguyenthedat  路  3Comments

fly-high-bj picture fly-high-bj  路  3Comments

tmccartan picture tmccartan  路  3Comments

eliab picture eliab  路  3Comments