Sorting String Values in Druid

Hello all,

In Druid, I am storing numerical values that represent strings (i.e. country codes, domain id’s, etc.)

After retrieving the data from Druid, I then map them to their respective string representations.

However, it has become impossible to sort by these dimensions, as the lookup is done after the fact.

In another post, a member suggested for this lookup and that also seems to be done after the fact.

For instance, if I wanted to sort by Country Name, but only store Country IDs, how can I achieve this?

Should I be storing Country Names directly in Druid, instead? Why or why not? What are the storage/performance impacts of doing this?

Thanks in advance!

  • Rafael

Hi Rafael, if you don’t need to update the country names, I suggest storing them directly in Druid. You can also store the country code as another dimension. If you do need to do updates on these values, then using lookups in the way to go.