Support Questions

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

RouteOnAttribute to FetchFile: Ignore the flowFile

avatar
Expert Contributor

I have a flow usecase wherein I use RouteOnAttribute to route to FetchFile.

FetchFile processor is then supposed to read a file from a directory and send it to PutSFTP processor.

But I observe that file routed from RouteOnAttribute to FetchFile is what is forwarded to PutSFTP.

What I want is that FetchFile forwards that file to PutSFTP that it reads from directory.

Is it possible?

1 ACCEPTED SOLUTION

avatar
Super Mentor

@manishg 

The FetchFile processor fetches the content of the target file and inserts its content into the FlowFile that triggered the Fetch.  That FlowFiles is then passed on to the next processor.  So whatever is set as the "filename" attribute on the FlowFile will remain the filename even after fetching the content.  Without the specific on the rest of your dataflows configuration, it is hard to provide any additional input on your issue.

My guess here is that the putSFTP processor is writing the content of the fetched file to the target SFTP server location; however, its filename is not that of the fetched file.  If this is the case, you have a datafow design issue and need to check your configurations to make sure the filename attribute is being set accordingly.

If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

View solution in original post

1 REPLY 1

avatar
Super Mentor

@manishg 

The FetchFile processor fetches the content of the target file and inserts its content into the FlowFile that triggered the Fetch.  That FlowFiles is then passed on to the next processor.  So whatever is set as the "filename" attribute on the FlowFile will remain the filename even after fetching the content.  Without the specific on the rest of your dataflows configuration, it is hard to provide any additional input on your issue.

My guess here is that the putSFTP processor is writing the content of the fetched file to the target SFTP server location; however, its filename is not that of the fetched file.  If this is the case, you have a datafow design issue and need to check your configurations to make sure the filename attribute is being set accordingly.

If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt