Adding dynamic (not predefined) Dimensions in Druid


Our use case is where we don’t have predefined dimensions, so we’ve used useFieldDiscovery = true as suggested here.

Now we are able to get the dimensions on runtime but issue is with types of these dimensions which is always VARCHAR.

We are using WikitickerSample.json that is there on Druid tutorials.

Attached is the parseSpec that we are using.

Basic question is to how detect type in wikiticker sample json, while using useFieldDiscovery = true.

Spec.json (1.11 KB)

Hi Nikhil,

If you use auto dimension discovery then any auto discovered dimension will be treated as a string.

You can specifically get it to treat some columns as numbers (despite using “rollup”: false) by specifying them as metrics

Hope this helps