Support Questions

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

FetchSFTP and then move file to another remote server

avatar
Contributor

Hello,

 

I have files that are in server A. I have the ListSFTP -> FetchSFTP processors setup in server B. My goal is to Fetch the files from server A, so that they are in the pipeline of server B, but after fetching the files, I want to move the files to another remote location, server C.

 

Can anybody help me out with this? I feel like it's a simple solution that I'm missing..

 

 

1 REPLY 1

avatar
New Contributor

If the goal is to retrieve the file from Server A, process it on Server B and then move them to Server C...

Use ListSFTP to retrieve the file list from Server A

Use FetchSFTP to retrieve the file  from Server A and copy it into a flowfile on Server B.  In the processor Properties, set Property Completion Strategy to "Delete File".  That will remove the file from Server A after it is successfully turned into a flowfile.

Use PutSFTP to copy the flowfiles out to a file on Server C

 

I think that accomplishes what you want and the file is still in NiFi on Server B for whatever additional processing is needed.