Reputation: 394
I would like to store results into SFTP, these results are generated from large SQL dump between date ranges. For the same, I am running it over a loop for the date lists.
But the problem lies in during iteration i++
. The flowfile content keeps growing from the PutSFTP's outgoing flowfile content.
How can I flush the flowfile results of PutSFTP
processor so that it can be avoided for next iteration? However, at the same time, I would like to maintain the other important variables from different UpdateAttribute
within the loop.
The given Nifi flow can be shown as follows.
Upvotes: 1
Views: 390
Reputation: 31540
Use ModifyBytes processor,After PutSFTP processor.
Configs:
With this configs we are going to remove all contents of the existing flowfile
and this processor won't delete any existing attributes associated with the flowfile.
Flow:
-> other processors
|(success)
-> PutSFTP
|(success)
-> ModifyBytes
|(success)
-> i++(UpdateAttribute)
|(success)
-> other processors
Upvotes: 2