Cannot use metric of type REAL
Make sure these boxes are checked before submitting your issue - thank you!
- [x] I have checked the superset logs for python stacktraces and included it here as text if any
- [x] I have reproduced the issue with at least the latest released version of superset
- [x] I have checked the issue tracker for the same issue and I haven't found one similar
Superset version
14.1
Expected results
Metric of type REAL should be available for selection.
Actual results
No metric of type REAL is available to select for a slice.
Steps to reproduce
- Use a table with columns of type REAL or DATE.
- Attempt to create a slice with metric of type REAL.
Is this druid or sql alchemy?
SQLAlchemy using PostgreSQL.
What do you have in the "list table columns" tab of your table for your column? What metric do you want to use on your column?
Well, the metric was missing. I assumed that the metrics would appear automatically, as in the case of columns of type INTEGER. Now that I created the metric, it works. Should I change the title?
What metric do you expect to be created automatically for a REAL field?
I used SUM(column), as the metric is a ratio of COUNTs aggregated in a day.
Why should an INTEGER column be different?
But is the sum checkbox checked? in the "list table columns"? I am pretty sure we are enabling some attributes on the columns depending on the type of fields, e.g. is_temporal.
"Sum", "Min" and "Max" are enabled, yet the only Sql Metric appearing by default is "count".
I'm also seeing the same behavior when using Redshift.
However, if I update the table in Redshift changing the columns from REAL to FLOAT then Superset will automatically check off the Sum, Min, and Max options as well as create the avg__ and sum__ metrics.
@petroswork @madmanbeck the PR above should do the trick