- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Read files from SFTP server and put file in back using sftp in apache NIFI
- Labels:
-
Apache NiFi
Created ‎01-11-2024 02:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Sir,
I am using apache nifi for
- Getting file from SFTP server
- Backup files another SFTP server
- Delete the all files from where getting locations
- process file to call invokeHttp Request
SFTP images using winscp:
After login folder locations:
1. Here is the diagram:
2. ListSFTP properties:
3. FetchSFTP properties
3. Put SFTP properties
I follow processors bellow sequences:
ListSFTP--> FetchSFTP-->PutSFTP-->UpdateAttribute --> InvokeHttp
I did not get file from sftp server.
What is the wrong of my configuration?
Created ‎01-11-2024 01:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@enam
Looks like you have a bad file filter regex in your listSFTP processor configuration.
.*file.*\.xls
Above looks for any character for 1 or more characters until is finds the last occurrence of string "file" followed by any character for as many characters until last occurrence of string ".xls". However, all your filenames start with "file" and have no characters before it.
Try modifying your file filter regex by removing the ".*" before "file":
file.*\.xls
Right click on processor, select "view state", and then "clear state". Then start the listSFTP processor again to see if generated NiFi FlowFiles for each file on your SFTP server.
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
Created ‎01-11-2024 06:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@enam, have you check the state of the ListSFTP processor (action "view State")?
With the listing strategy equals "Tracking timestamp", the processor save the last time it checks the SFTP folder and don't retrieve older files than this timestamp.
Created ‎01-11-2024 01:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@enam
Looks like you have a bad file filter regex in your listSFTP processor configuration.
.*file.*\.xls
Above looks for any character for 1 or more characters until is finds the last occurrence of string "file" followed by any character for as many characters until last occurrence of string ".xls". However, all your filenames start with "file" and have no characters before it.
Try modifying your file filter regex by removing the ".*" before "file":
file.*\.xls
Right click on processor, select "view state", and then "clear state". Then start the listSFTP processor again to see if generated NiFi FlowFiles for each file on your SFTP server.
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
