- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Will Nifi delete a file from SFTP ?
- Labels:
-
Apache NiFi
-
NiFi Registry
Created 05-08-2023 09:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are using ListSFTP and FetchSFTP to get the files from a vendor SFTP location. There are no explicit delete commands from our end to delete the file . However the file gets deleted and the vendor is pushing it on us saying we are having some process to delete the files . Will FetchSFTP delete the files after its downloaded from the Vendor SFTP server ?
Created 05-08-2023 10:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@RajiBM
The NiFi FetchSFTP processor has several "Completion Strategy" options:
- None (default) <- leaves file as-is on SFTP server after reading content
- Move File <- Moves file after successful read to directory specified in the "Move Destination Directory" property.
- Delete File <- Deletes original file from SFTP server after success read of content.
So as long as your FetchSFTP is configured with the default "None" Completion Strategy, the File will remain in original source location on the target SFTP server.
If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.
Thank you,
Matt
Created 05-08-2023 10:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the "Completion Strategy" property under FetchSFTP is set to? If its set to the default "None" then the file should not be deleted or moved. See the Completion Strategy options under:
If that helps please accept solution.
Created 05-08-2023 10:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Matt, I see its set to None.
Created 05-08-2023 10:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@RajiBM
The NiFi FetchSFTP processor has several "Completion Strategy" options:
- None (default) <- leaves file as-is on SFTP server after reading content
- Move File <- Moves file after successful read to directory specified in the "Move Destination Directory" property.
- Delete File <- Deletes original file from SFTP server after success read of content.
So as long as your FetchSFTP is configured with the default "None" Completion Strategy, the File will remain in original source location on the target SFTP server.
If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.
Thank you,
Matt
