Bug: Druid does not support verbose name for columns and metrics
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
0.18.5 + Secondary development
Expected results
Druid datasources displayed in table viz can display my custom verbose names.
Actual results
- When click on
Edit recordbutton for any druid column, there is not an option to set theVerbose Name; - There is a option for setting the
Verbose Namefor aDruid Metric, but after changing and saving it there is not effect. I've explore my local mysql table and my change for verbose name is not on the tablemetrics, however the change does not seem to be reflected onverbose_mapinbase.py.
Steps to reproduce
Navigate to druid datasource model view page and click on Edit record for any druid column or metric.
Fix
Fix for the error on druid column is easy; just navigate to connectors/druid/views.py and add verbose_name to edit_columns, and from there on you can set the verbose names for druid columns and the changes are indeed saved and can take effect on existing slices. I'm yet to figure out a solution for the latter problem though.
Edit
I figured the reason why metric verbose names do not work. In my druid table I have my own column named count, and apparently my verbose name for my own column which is default to be count overwrite the Chinese verbose name I gave to the count metric. In general, columns that have same name as metric can overwrite metric's verbose names. This seems to me a minor issue that however worthes taking note of and should be easy to fix.
Edit 2
I've just figured that count column in any druid datasource is an auto-generated column; as a result it's best if possible to modify the code so that count column would not overwrite count metric's verbose name, as this is likely to occur pretty often.
Actually you can use the 'Dimension Spec Json' field and set the "outputName" for the druid column.
Notice: this issue has been closed because it has been inactive for 263 days. Feel free to comment and request for this issue to be reopened.