- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Nifi Workflow to store count of success and failure for multiple route
- Labels:
-
Apache NiFi
Created ‎05-16-2021 07:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Created ‎05-17-2021 05:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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
