Support Questions
Find answers, ask questions, and share your expertise

Nifi Workflow to store count of success and failure for multiple route

New Contributor

Hi,

  We have scenario to read file feed containing different data schema for lines and then write to multiple tables. We are trying to setup error handling and consolidated all success and failure count for different types of data. our data flow is almost as follows,

getFile -> splitText -> RouteText -> ConvertToJson -> JsonToSql -> PutSql

 

Can you please help with some suggestion. Thanks in advance.

 

Regards,

Rahul

1 REPLY 1

Re: Nifi Workflow to store count of success and failure for multiple route

Master Guru

@rahul_ars 

You can use the "UpdateCounter" [1] processor to create counters and update the count on them (up and down).  The "Counter Name" property accepts NiFi EL, so you can use attribute son FlowFiles to dynamically update a counter uniquely by FlowFile traversing same dataflow path.  This will allow you to consolidate within your dataflow(s) to reduce the number of processors needed.  Fewer processors can lead to better performance through reduced resource utilization.

The "Counters" UI is found under the NiFi Global menu in the upper right corner of the NiFi UI.

[1] http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache...

 

If you found this help with your query, please take a moment to login and click accept on this solution.
Thanks,

Matt