Druid: identifying field as category

Using Druid :

I was expecting one my fields which stores type of payment_methods to be classified as “category”. This would have helped me use this as a dashboard filter. I have confirmed that this field has 6 unique values so it is well below the limit of 40 that is documented in the other topics … I tried to use “Sync” button to see if I find any errors in the logs. But I do not. It shows 67% analyzed for this druid table… in case not being at 100% is a problem.

08-23 18:11:51 INFO sync-database.analyze :: [*********************************·················] :smirk: 67% Analyzed table ‘billdata-1’.

Interestingly, another field “status” in this table which has 3 possible values gets classified as “category”

Lastly, I inspected metabase_fieldvalues table that seems to be keeping list of unique values in the fields marked as category… I do not see any Druid tables/fields that I have added. Should I see “status” field which was flagged as category in here ?

Any troubleshooting pointers will be a big help.

Thank you.

Adding our finding… in case it helps anyone else.

Druid analyzer may be skipping the data analysis as this step may not have been implemented in the driver yet.

Status seems to be getting picked up as a “category” because it is defined specifically here –

So we can either classify our druid columns as categories in the field.clj or use admin option to mark our Druid column as “Category”.

Lastly, metadata table metabase_fieldvalues will not have values for our Druid category columns, possibly because of un-implemented analyze function. Side effect of that is the dashboard filter on category columns will not show drop down values. So our quick choice (before we attempt to write a druid analyze function) is to manually insert records in metabase_fieldvalues table. Such manually inserted values are displayed ok by our dashboard filters.

Happy to hear about any other ways to address this or any holes with our analysis/work around…