Last seen value when aggregating

Hey All,

I’m working with a scenario where we are doing realtime ingestion, but the value I are taking in is an already computed average. I have my querygranularity set to hour and would like to have the value for each hour for the given dimensions be the last received value for that column, ignoring the previously received ones.

Is it possible to do this in stock druid with existing aggregators, and if not, does it sound like it would be possible to hack in as a new aggregator?



Hi Zak,

I think your use case is similar to the one described here:!searchin/druid-development/last$20aggregator/druid-development/IBVMuCbOLHE/JlveE6cehgkJ

Is that true?

Hey Fangjin,

That’s exactly what I’m looking for. Specifically what Eric said

“…assuming it’s based on time, it would be pretty easy to create an aggregator that just stores the value it’s been given and overwrites it every time it’s given a new value.”

I’ll take a look at the javascript aggregator to see if I can make it work there, if it goes well I’d be happy to try my hand at a native version too.