Support Questions

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

How to make a copy of input file?

Expert Contributor

I have a usecase wherein in case of an error I need to make a copy of input file and send it to some FTP location so that it can be assessed.

What is idiomatic way of achieving this? 



Hi @manishg ,

Can you be more specific when you say "an error"? is  it an error on a processor or is it error in nifi system? if its an  error on processor what kind of processor and what kind of error are you getting or working with?

Generally speaking, when a processor fails it sends the flowfile to the failure relationship which you can capture and do what is needed to handle this error, however every processor behaves a little different from one another , also the nature of error can sometimes decide what can happen. In my experience I have seen different behaviors as follows:

1- flowfile is sent to the failure relationship which what you expect

2- flowfile is lost even though the failure relationship is captured. this usually happens upon fatal error and\or uncaptured exceptions.

3- flowfile is pushed to the upstream queue and penalize.

Expert Contributor

Error is in processor. Basically a functional error, nothing to do with nifi.


What kind of processor? most of processors have failure relationship which you can  capture and do the error handling of that.

If that helps please accept solution.



Expert Contributor

Its a script processor to run a groovy script. If a functional error is detected, I need to send original input file over FTP.