Can we filter on metrics column to exclude certain rows?

Hi, Guys,

We have an aggregate/ metrics column with integer value of (0 to 10), we set up our batch load with roll up set to ‘true’. If we want to query on this metrics for average value, but would like to exclude zero. How can we put in the filter part?

Since roll up is set to ‘true’ on sum, how would druid behave in this case?

Thanks
Hong

Hi Hong,

In the ingestion spec you can compute custom denominator. ex: denm_count = if value<0 then 0 else 1.
you can use this computed metric to compute your avg, sum(value)/denm_count. This way you will be eliminating counting 0 values to compute avg.

Regards, Chari.