Dimensionspecs during ingestion

Hi,

Imagine the following situation: in my data there is a high cardinality field, “a”, which can be also null. I use a hyperUnique aggregator on this field, but I’d also like to know the number of ingested lines where this field “a” was null. Currently my data also contains a field, “is_a_null”, which contains this information, and is ingested as a dimension in druid.

Optimally, I’d like to get rid of this field from my data, and use a dimensionspecs at ingestion time to transform “a”:

{

“type” : “extraction”,

“dimension” : “a”,

“outputName” : “is_a_null”,

“extractionFn” : {

“type” : “javascript”,

“function” : “function(str) { return str == null; }”

}

}

Is something like that possible?

Best regards,

Balazs