Created 02-21-2017 02:14 PM
I have multiple files on my SFTP server with different filenames(filenames have date time appended).Now, I am using ListSftp, RouteOnAttribute, FetchSftp and putHdfs processors. But on the FetchSftp processor I have doubt on how to put all the files on the remote SFTP server to HDFS. Is there any option to provide the list of the file names to "Remote File" property of FetchSftp processor configuration?
Thanks!
Created 02-21-2017 02:30 PM
The ListSFTP processor will list all the files on your remote SFTP server based on your parameters and will generate one flow file with only metadata (attributes) for each listed file. Then this flow file (with no content yet) will be transmitted to your FetchSFTP processor that will use the metadata of the incoming flow file to actually fetch the content of the remote file into the flow file content.
To use the attributes of the incoming flow file, you should configure the remote file property with something like:
${path}/${filename}
You can find an example here:
Hope this helps.
Created 02-21-2017 02:30 PM
The ListSFTP processor will list all the files on your remote SFTP server based on your parameters and will generate one flow file with only metadata (attributes) for each listed file. Then this flow file (with no content yet) will be transmitted to your FetchSFTP processor that will use the metadata of the incoming flow file to actually fetch the content of the remote file into the flow file content.
To use the attributes of the incoming flow file, you should configure the remote file property with something like:
${path}/${filename}
You can find an example here:
Hope this helps.
Created 02-22-2017 05:20 AM
@Pierre Villard Thank you very much dear! You made my day!