09-04-2020 02:39 PM
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
Solved! Go to Solution.
09-14-2020 10:42 PM
@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]
09-04-2020 03:24 PM
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.
See also
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439379/Binary+Snap+Pack
09-14-2020 02:58 PM
Thank you. That is very helpful.
I am attempting to upload PGP Encrypted file to a SFTP server
What should be the encrypted_filename here? How do I get the encrypted file name?
Thanks
09-14-2020 10:42 PM
@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]
04-29-2024 10:36 AM
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