Skip to main content

SLAM_load

Overview​

SLAM_load reaches all three APIs and file loading through one procedure. It calls the load procedure that matches @api, which is useful when the API is chosen at run time.

Parameters​

NameTypeDefaultDescription
@sObjectNVARCHARRequiredSalesforce object name to load data into
@tableNVARCHARRequiredInput SQL table containing data to load
@apiNVARCHARRequiredAPI to use ('bulk', 'bulkv2', 'soap' or 'blob')
@operationNVARCHARRequiredOperation type ('insert', 'update', 'upsert', 'delete', 'hardDelete', 'undelete')
@bulk_parallelBIT1Bulk v1 API only. Enable parallel batch processing when set to 1. Serial mode when 0
@batch_sizeINTNULLRecords per batch for SOAP/Bulk v1 API. Uses API defaults if NULL
@externalIdNVARCHARNULLExternal ID field name (required for upsert operations, required for bulkv2)
@ignore_nullsBIT0SOAP API only. Whether to ignore NULL values when sending data. When set to its default value of 0, NULL and empty string data are sent to Salesforce with the instruction to blank out the field. When set to 1, NULL values are ignored (existing data is preserved), but empty strings still blank out the field. See NULL and Blank Handling for detailed behavior across all APIs
@dwell_timeFLOAT0SOAP API only. Wait time between batches in seconds
@soap_optionsNVARCHARNULLSOAP API only. Additional SOAP headers and options. See SOAP Headers
@failure_thresholdDECIMAL(5,2)100Allowable failure rate (0-100) as a percentage of rows. When the failure rate goes over the threshold, the load still finishes and writes each row's result to the input table, then the procedure raises SQL error 88302. When 100, no error is raised.
@dry_runBIT0When set to 1, validates field mapping and reports results without sending any data to Salesforce. See Dry Run

Usage Examples​

Load using Bulk v1 API with minimal parameters:

EXEC dbo.SLAM_load
@sObject = 'Account',
@table = 'Account_insert',
@api = 'bulk',
@operation = 'insert'

Load using Bulk v2 API with required external ID:

EXEC dbo.SLAM_load
@sObject = 'Contact',
@table = 'Contact_upsert',
@api = 'bulkv2',
@operation = 'upsert',
@externalId = 'Contact_External_Id__c'

Load using SOAP API with full control options:

EXEC dbo.SLAM_load
@sObject = 'Case',
@table = 'Case_load',
@api = 'soap',
@operation = 'insert',
@batch_size = 150,
@dwell_time = 2.0,
@soap_options = 'AllOrNoneHeader,allOrNone,true;EmailHeader,triggerUserEmail,false'