Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Ensure RunMongoAggregation runs after PutMongo

avatar

For my NiFi data flow, I am taking CSV, converting them into JSON, posting those JSON files into a database (PutMongo), and then running an aggregation function (RunMongoAggregation). Attached are images to show that data file. My question is how can I construct my flow so that I can ensure that RunMongoAggregation is hit after PutMongo? I've looked into implementing some Wait/Notify pattern but got really lost in the implementation. Ideally, I would like to have a RunMongoAggregation triggered whenever new data gets into the PutMongo processor.

If anyone would like to test the processor, I have attached the template file. It is tested with AIS ship data (find online)


putmongo.jpgrunmongoaggregation.jpg
1 ACCEPTED SOLUTION

avatar
Master Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
2 REPLIES 2

avatar
Master Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar

Thank you Shu for your quick response. I followed your instructions regarding the PutMongoRecord processor. That helped simplify my flow a bit.

If the RunMongoAggregation is working as I think it is, then as a FlowFile runs through the processor, it will "trigger" the processor and then route onto original, while the aggregation works on the database and output into "results" (see image below). Is that your thought process? Also -- I probably have to clear out the database I'm aggregating on between data-sets to prevent duplicates, do I not? @Shu


aggregation-trigger.png