Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

[NiFi] To count the appearance of a particular word in 10 seconds.

New Contributor



I'm writing this to get a solution for the problem, where a stream of messages are sent and I want to count the word "Apples" in the stream of data, let's say in a window of 10 seconds. 


I tried AttributeRollingWindow but couldn't got the desired response.


Thanks in Advance,



New Contributor

if working example of attributeRollingWindow is there, that would be of help too.




Expert Contributor

You can write a simple custom processor which uses local caching (like Caffeine cache implementation) with cache expiry time as ur window time and build the logic.

May be you can store words in cache and keep updating the count or something like that

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.