API Procedures
Snoweaver offers a suite of stored procedures and functions within each connection schema , enabling users to perform various tasks such as command execution, file upload, and file download.
Reference
SSH
This function sends an SSH command to the remote server for execution and returns the result.
Arguments:
- command (varchar)
The command to be executed on the remote server.
Return Value: (variant)
{
"success": [true|false],
"data": "Detailed execution results or error message.",
}
DOWNLOAD
This procedure downloads a specific file from the remote server to the DATA stage of the current connection schema via SFTP.
Arguments:
remote_file_path (varchar)
The full path of the file on the remote server to be downloaded.
file_path (varchar)
The local file path where the downloaded file will be saved in the DATA stage.
compress (boolean, optional) Default: True
If true, compresses the downloaded file.
overwrite (boolean, optional) Default: True
If true, overwrites an existing file with the same name.
parallel (integer, optional) Default: 4
Number of parallel streams to use for downloading large files.
Return Value: (variant)
{
"success": [true|false],
"data": "local file path to the downloaded file or error message.",
}
UPLOAD
This procedure uploads a specific file from the DATA stage of the current connection schema to the remote server via SFTP.
Arguments:
file_path (varchar)
The local file path of the file in the DATA stage to be uploaded.
remote_file_path (varchar)
The full path of the file on the remote server where the file will be uploaded.
decompress (boolean, optional) Default: False
If true, decompresses the file before uploading.
parallel (integer, optional) Default: 4
Number of parallel streams to use for uploading large files. Defaults to 4.
Return Value: (variant)
{
"success": [true|false],
"data": "remote file path of the uploaded file or error message.",
}