SLAM_download_blobs
This command downloads files from ContentVersion, Attachment, or Document objects onto the file system. A table with an Id column containing Salesforce Ids of the desired files must be provided.
Files are downloaded to the blob directory that was configured during installation. By default this is C:\Speediful_SLAM_blob. The SQL Server Service Account must have write access to the folder. Files are renamed as they are downloaded with their Salesforce Id and a .file extension, e.g. 00PHo00001smtyMMAQ.file and 068Ho00000f8zcXIAQ.file.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
@sObject | NVARCHAR | Required | Salesforce object type ('ContentVersion', 'Attachment', or 'Document') |
@table | NVARCHAR | Required | Source SQL table containing record IDs to download. Must have an Id column |
@directory | NVARCHAR | default as per installation configuration | Target directory for downloaded files |
Usage Examples:
Download ContentVersion files to default directory:
-- download record data without files
EXEC dbo.SLAM_query_bulk
@query = 'ContentVersion',
@table = 'ContentVersion_query'
-- download files
EXEC dbo.SLAM_download_blobs
@sObject = 'ContentVersion',
@filter_table = 'ContentVersion_query'
Download Attachment files to custom directory:
-- download record data without files
EXEC dbo.SLAM_query_bulk
@query = 'Attachment',
@table = 'Attachment_query'
-- download files
EXEC dbo.SLAM_download_blobs
@sObject = 'Attachment',
@filter_table = 'Attachment_query',
@directory = 'C:\MyFiles\Attachments\'
Download Enhanced Notes (ContentNotes). They are a type of ContentVersion:
-- download record data without files
EXEC dbo.SLAM_query_bulk
@query = 'SELECT * FROM ContentVersion WHERE FileType=''SNOTE''',
@table = 'ContentVersion_query_notes'
-- download files
EXEC dbo.SLAM_download_blobs
@sObject = 'ContentVersion',
@filter_table = 'ContentVersion_query_notes'
Download Document files to a custom directory:
-- download record data without files
EXEC dbo.SLAM_query_bulk
@query = 'Document',
@table = 'Document_query'
-- download files
EXEC dbo.SLAM_download_blobs
@sObject = 'Document',
@filter_table = 'Document_query',
@directory = 'D:\DocumentBackup\'