upload_sftp
This procedure uploads files to an SFTP server.
SQL
CREATE VIRTUAL PROCEDURE upload_sftp(
IN sftp_user string OPTIONS (ANNOTATION 'username'),
IN sftp_password string OPTIONS (ANNOTATION 'password ( not needed if key based auth is used )'),
IN sftp_server string OPTIONS (ANNOTATION 'hostname or IP-address of the sftp server'),
IN sftp_port integer OPTIONS (ANNOTATION '[OPTIONAL] if NULL or omitted it defaults to 22'),
IN file_datasource string OPTIONS (ANNOTATION 'the datasource name which holds the files to upload'),
IN file_source_name string OPTIONS (ANNOTATION 'filename of the file to upload'),
IN file_dest_directory string OPTIONS (ANNOTATION 'destination folder, where the files should be uploaded to'),
IN file_dest_filename string OPTIONS (ANNOTATION '[Optional] destination filename ( if NULL, or omitted the source filename is used)'),
IN sftp_private_key string OPTIONS (ANNOTATION 'private key ( not needed password auth is used )')
)
RETURNS ( "status" string OPTIONS (ANNOTATION 'upload status') )