cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up SFTP connection to download file

mtran21
New Contributor III

I am new to SnapLogic and currently learning how to use SnapLogic. At this moment, I am looking for some guidance how to create a pipeline that logs into a remote FTP server via SFTP and download a file to my share folder.

I already created a SSH Account. My next is I don’t know which snap to be used to make the connection to FTP server and download the file.

Please help
Thanks

1 ACCEPTED SOLUTION

@mtran21 … In file write , you can specify the filename what you want to write to target system. This encrypted_filename is whatever filename you use in PGP encrypt file. If you use any pattern can write in pipeline param then use it or if you want to hard code like->
‘-myEncryptFile-’+Date.now()+‘.xml’ instead of $[encrypted_file]

View solution in original post

4 REPLIES 4

siwadon
Employee
Employee

Hi @mtran21,

You can use File Reader, provide the URL to the FTP server such as sftp://example.com/folder/file.csv, and select the SSH account you have created. Then connect it to File Writer snap to write it to the destination you want.

Screen Shot 2020-09-04 at 3.18.12 PM

See also
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439379/Binary+Snap+Pack

mtran21
New Contributor III

Thank you. That is very helpful.

I am attempting to upload PGP Encrypted file to a SFTP server
image

What should be the encrypted_filename here? How do I get the encrypted file name?

image

Thanks

@mtran21 … In file write , you can specify the filename what you want to write to target system. This encrypted_filename is whatever filename you use in PGP encrypt file. If you use any pattern can write in pipeline param then use it or if you want to hard code like->
‘-myEncryptFile-’+Date.now()+‘.xml’ instead of $[encrypted_file]

Hello,

Sorry to revive the thread after four years, however I am struggling with the very same problem, namely "setting up SFTP connection to download a file".

I am using only one snap: "File Reader". I set up an SSH account with the key of type "ed25519" (According to https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439379/Binary+Snap+Pack , the algorithm does not seem deprecated)

Still, during validation, I am getting the following error :

 

Failure: Unable to read from sftp://server:port/path/to/file,
 Reason: java.io.IOException: Failed to get SFTP session connected, Resolution:
Check for URL syntax and file access permission

I have tried "rsa" key before and got the same error. The server has the corresponding public key