Search code examples
apache-nifi

Nifi: Zero Byte Error with Nifi PUTSFTP Processor. Is there a way to send Zero byte Flow file through PutSFTP?


I got a problem while sending a Zero Byte flow file through Nifi PutSFTP processor. Wondering if there is some configuration I have to set? thanks.

Use case: get a file from a directory (GetFile Processor) send the file through SFTP (PutSFTP Processor) if success, change the filename to new filename (UpdateAttribute Processor) Remove the all of the content (ReplaceText Processor). Zero Byte flow file send the new filename through SFTP (PutSFTP Processor)

I gotten this error while sending Zero Byte flow file over using PutSFTP Processor

PutSFTP[id=1a091db4-1f9e-14cd-5206-1514485febc8] Rejecting StandardFlowFileRecord[uuid=247457a8-6608-4271-a626-3c016a1bbe7c,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1618805512561-40, container=default, section=40], offset=15043, length=0],offset=0,name=AS_MPS_20200927_010010.xml.done,size=0] because it is zero bytes

Please click to look at the Nifi Processor Image

It will be great if someone could help me.

Thanks in advance.


Solution

  • There is a parameter in putsftp processor

    Reject Zero-Byte Files

    Determines whether or not Zero-byte files should be rejected without attempting to transfer

    Set it to false to allow zero byte files on the level of nifi