From what I understood after using NiFi to built some DB ingestion PoCs, the entire dataflow operates as a stream of flow files. And at any particular time, the execution control could be at one or more processors at the same time.
So I am really confused on how to debug a complex dataflow for any failures.
My PoC workflow itself looks like this.
And when we will go with production use cases, it can get much more complicated than this. So I have few questions.
How to know the status of the dataflow. If let's say 4 out 10 forked flow files failed at
GenerateTableFetch
for database pool error, how do I know which ones failed and how to quickly replay them without going to data provenance and doing one by one.Is there a way to know just by looking at the dataflow that which flowfiles at which processor are failing.
I have lot more doubts / confusions on debugging dataflows with NiFi and if someone can please point me to some doc or share best practices, that would be helpful.
Thanks.
Every processor should have one or more failure relationships. It is up to you decide what to do with a failure... in some cases you can route a failure relationship back to the same processor to keep re-trying, in other cases you could route it to a PutFile processor and write it out to local disk in order to inspect the contents, or you could route it to a PutEmail processor to email someone.
What you don't want to do is auto-terminate the failure relationship because then you are essentially saying you want to ignore it.