- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
FetchSFTP and then move file to another remote server
- Labels:
-
Apache NiFi
Created ‎01-21-2021 09:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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..
Created ‎10-27-2021 09:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
