You are on page 1of 1

9/24/2020

Use the SFTP Virtual Procedure to Transfer


Files
You can use SFTP to transfer les between remote and local systems using the SFTP virtual procedure with the File adapter.

Procedure
. Create a virtual procedure using a graphical editor, under the SFTP folder for your File adapter. For example, call it
“procedures_sftp”.

 Note
You can also create a virtual procedure using the SQL console using the following sytax:

CREATE VIRTUAL PROCEDURE procedures_sftp (IN METHOD NVARCHAR(1024), IN USERID NVARCHAR(1024), IN P


CONFIGURATION '{
"__DP_UNIQUE_NAME__": "SFTP",
"__DP_HAS_NESTED_PARAMETERS__": false,
"__DP_USER_DEFINED_PROPERTIES__": {},
"__DP_INPUT_PARAMETER_PROPERTIES_": [],
"__DP_RETURN_PARAMETER_PROPERTIES_": [],
"__DP_VIRTUAL_PROCEDURE__": true,
"__DP_HAS_INTERNAL_OUTPUT_PARMETER__": false,
"__DP_DEFAULT_OUTPUT_PARAMETER_INDEX__": 0
}' AT "fileAdapter"

. Execute the virtual procedure using the following syntax: call "SYSTEM"."PROCEDURES_SFTP" (method, userid,
password, serveraddr, serverport, remotefile, local file, result, ?);. Use the SFTP virtual procedure
parameters to de ne your procedure.

Upload example

call "SYSTEM"."PROCEDURES_SFTP" ('UPLOAD', 'rootuser', 'pa$$word', "serverONE', '1234', '/root/folde

Related Information
SFTP Virtual Procedure Parameters
Create a Virtual Procedure

1/1

You might also like