I am going to make a template in which I use GetSftp processor, but I want to give path to fetch files dynamically which I get from database. For this I am using nifi expression language by which I set my dynamic value which comes from sql processor in attribute of a flow file. But now problem here is that GetSftp is a starting processor so it won't able to take input stream so I wont able to pass dynamic values to sftp. Please let me know some solution
Use Fetch SFTP processor instead of Get SFTP and Fetch SFTP processor accepts incoming connections.
1.You Need to update the Remote File value as per your dynamic attribute names.
The fully qualified filename on the remote system Supports Expression Language: true
2.What needs to be done once the files got fetched from the specified directory?
None //leaves file as is
Move File //moves the file to specified destination folder<based on Move destination directory
Delete File //delete the file once it got fetch from the directory
3.Only valid if Completion strategy is Move File
Move Destination Directory
The directory to the move the original file to once it has been fetched from the file system. This property is ignored unless the Completion Strategy is set to "Move File". If the directory does not exist, it will be created. Supports Expression Language: true
After preparing Dynamic attributes having filenames then use Fetch File processor and change the Configs as per your requirements.
in my case, i did not know what are the filenames in remote server. i will set host,port,username, password as attributes in FetchSFTP processor and get this information from another flow file. but..for remote filename, how to set parameter for Remote directory connection and get all files.
i want to connect to n number of customer systems and fetch files and copy into local. in my case how to do dynamic parameterisation with this FetchSFTP processor. Can you please suggest me.