superset icon indicating copy to clipboard operation
superset copied to clipboard

Bug: Druid does not support verbose name for columns and metrics

Open fufjvnvnf opened this issue 9 years ago • 2 comments

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 record button for any druid column, there is not an option to set the Verbose Name;
  • There is a option for setting the Verbose Name for a Druid 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 table metrics, however the change does not seem to be reflected on verbose_map in base.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.

fufjvnvnf avatar Jun 28 '17 06:06 fufjvnvnf

Actually you can use the 'Dimension Spec Json' field and set the "outputName" for the druid column.

JessicaDuan avatar Aug 03 '17 06:08 JessicaDuan

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.

mistercrunch avatar Apr 23 '18 15:04 mistercrunch