Support Questions
Find answers, ask questions, and share your expertise

Dynamically pass values to GETSFTP processor.


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



Super Guru
@Prakhar Agrawal

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.

Remote FileThe 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?

Completion StrategyNone
  • 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 DirectoryThe 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.


Hi @Shu

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.

Rangareddy Y

; ;