guide_ssis » Revisions »
Differences
This shows you the differences between the selected revisions of the page.
guide_ssis 2018-03-21 | guide_ssis 2022-08-12 (current) | ||
Line 13: | Line 13: | ||
Start by creating WinSCP script file to transfer your files. | Start by creating WinSCP script file to transfer your files. | ||
- | Below you can see a basic script example for downloading file from SFTP server. For details see [[guide_automation|guide to automation]] or [[scripting|detailed documentation of scripting functionality]]. You can also have WinSCP [generate a script template](ui_generateurl#script) for you. | + | Below you can see a basic script example for downloading file from SFTP server. For details see [[guide_automation|guide to automation]] or [[scripting|detailed documentation of scripting functionality]]. You can also have WinSCP [[guide_automation#generating|generate a script template]] for you. |
<code winscp> | <code winscp> | ||
- | open mysession -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" | + | open mysession -hostkey="ssh-rsa 2048 xxxxxxxxxxx..." |
get /remotepath/data.dat c:\localpath\ | get /remotepath/data.dat c:\localpath\ | ||
exit | exit | ||
Line 23: | Line 23: | ||
In the script you need at least to: | In the script you need at least to: | ||
* Replace ''mysession'' argument to ''[[scriptcommand_open|open]]'' command with specification of SFTP connection in form ''%%sftp://username:password@hostname/%%'' or use name of [[session_configuration#site|site]]. | * Replace ''mysession'' argument to ''[[scriptcommand_open|open]]'' command with specification of SFTP connection in form ''%%sftp://username:password@hostname/%%'' or use name of [[session_configuration#site|site]]. | ||
- | * Replace host key fingerprint after ''[[scriptcommand_open#hostkey|-hostkey]]'' switch of ''[[scriptcommand_open|open]]'' command with actual fingerprint of your [[ssh_verifying_the_host_key|SFTP/SSH server host key]];((Note that depending on encryption method, the host key may have different format than shown in the example)) | + | * Replace host key fingerprint after ''[[scriptcommand_open#hostkey|-hostkey]]'' switch of ''[[scriptcommand_open|open]]'' command with actual fingerprint of your [[ssh_verifying_the_host_key|SFTP/SSH server host key]];((Note that depending on encryption method, the host key may have different format than shown in the example.)) |
* Replace paths after ''[[scriptcommand_get|get]]'' command with actual paths to remote file to download from and local directory to download to. | * Replace paths after ''[[scriptcommand_get|get]]'' command with actual paths to remote file to download from and local directory to download to. | ||
Save the script into file accessible from SSIS. | Save the script into file accessible from SSIS. | ||
- | ===== SSIS/SSDT task ===== | + | ===== [[task]] SSIS/SSDT task ===== |
In SSIS/SSDT, add new //Execute Process Task// to control flow of your package. In the //Execute Process Task Editor//: | In SSIS/SSDT, add new //Execute Process Task// to control flow of your package. In the //Execute Process Task Editor//: | ||
* Put path to WinSCP [[executables|executable]] (by default ''C:\Program Files (x86)\WinSCP\WinSCP.exe'') &winpath &win64 into //Executable//; | * Put path to WinSCP [[executables|executable]] (by default ''C:\Program Files (x86)\WinSCP\WinSCP.exe'') &winpath &win64 into //Executable//; |