Speediful Documentation
website·Indexed 30 days ago
https://docs.speediful.comDocumentation for Speediful's SLAM (Salesforce Load And Migrate) toolset, providing utilities for high-performance data query, load, and metadata operations between Salesforce and SQL Server. Includes guides on using the Salesforce Bulk v2 and SOAP APIs, managing JWT Bearer Authentication, and executing specialized procedures like SLAM_replicate, SLAM_load_lockbuster, and data dictionary exports.
What's inside Speediful
- Speediful is a specialized integration tool designed to enable direct data exchange between a SQL Server database and Salesforce.
Perform large data loads into Salesforce using SLAM_load_bulkv2
The
SLAM_load_bulkv2stored procedure allows Salesforce to orchestrate large data loads. It supports several operation types:insert,update,upsert,delete, andhardDelete.Critical Requirement: The
@externalIdparameter is mandatory for all Bulk v2 operations and must correspond to a real Salesforce field. This is required to correlate Salesforce results back to the original input table. FordeleteandhardDeleteoperations, the@externalIdmust be set to'Id'.Choose between JWT Bearer and Security Token authentication for Salesforce
Speediful supports two methods for connecting to Salesforce. Both are implemented using the
SLAM_add_connectioncommand, where the@auth_methodparameter determines the authentication flow.Method Description Key Requirements JWT Bearer OAuth JWT Bearer flow via Salesforce External Client App. Recommended for new connections. Private Key (.pem), Certificate (.crt), Consumer Key, and an active External Client App. Security Token Username, password, and security token via SOAP login(). Salesforce Username, Password, and Security Token. Requires SOAP API login() enabled. Note: Object, record, and field access are governed by Salesforce Profiles and Permission Sets. It is recommended to ensure the user has 'View All Data', 'Modify All Data', and 'View Encrypted Data' permissions where appropriate.
Export multiple SQL Server tables to CSV using SLAM_tables_to_csv
SLAM_tables_to_csvis a utility function that exports multiple SQL Server tables to CSV files. It reads a list of table names from a specified database table and processes them sequentially. The operation is independent of Salesforce and logs activity to theSLAM_Activity_Logtable if configured.Output Specifications:
- Format: Standard CSV (comma delimiters, quoted fields, UTF-8 encoding).
- Content: All columns are exported; NULL values are represented as empty strings.
- Empty Tables: Generates a CSV containing only the column headers.
- Error Handling: Continues processing subsequent tables even if an individual table export fails, reporting errors at the end.
Load data into Salesforce using the SLAM_load procedure
Thedbo.SLAM_loadprocedure is a generalized load method that provides access to multiple Salesforce APIs and file loading through a single procedure. It delegates the load to the appropriate API based on the@apiparameter, allowing for dynamic API selection.Export a SQL Server table to CSV using SLAM_table_to_csv
SLAM_table_to_csvis a utility function that exports the entire contents of a SQL Server table to a CSV file. It operates entirely within SQL Server and does not require a Salesforce connection.Output Specifications:
- Format: Standard CSV with comma delimiters, quoted fields, and UTF-8 encoding.
- Columns: All columns from the source table are exported.
- NULLs: Written as empty strings.
- Empty Tables: Generates a CSV containing only column headers.
- Logging: Operations are logged in the
SLAM_Activity_Logtable if configured.
Perform large data loads using SLAM_load_bulk
The
SLAM_load_bulkprocedure provides high-level control for loading large datasets into Salesforce. It supports various operations including insert, update, upsert, delete, and hardDelete.Important Constraints:
- Custom Address Fields: Salesforce has not validated Bulk v1 for use with custom address fields; use Bulk v2 for those scenarios.
- Parallel Processing: Parallel loading is enabled by default (
@bulk_parallel = 1), which significantly reduces load time. However, serial loading (@bulk_parallel = 0) is recommended for objects with lengthy triggered business process flows or junction objects to avoid detrimental effects on throughput.
Load Salesforce data using SLAM_load_soap
TheSLAM_load_soapstored procedure is used to load data into Salesforce via the SOAP API. It is best suited for smaller volumes of records and is the only API that supports the 'undelete' operation. It allows for additional control through SOAP headers via the@soap_optionsparameter.Profile SQL Server tables using SLAM_Alpha_profile_data
SLAM_Alpha_profile_datais a utility procedure that profiles SQL Server tables to produce descriptive statistics at three levels: table-level (row/column counts), column-level (min/max, averages, null/blank counts, distinct values), and value-level (frequency distribution for low-cardinality columns).Prerequisites: Valid Salesforce credentials are required for license validation, though the procedure only accesses SQL Server data.
Import CSV files into SQL Server using SLAM_Alpha_import_csvs
The
dbo.SLAM_Alpha_import_csvsstored procedure imports all files with a.csvextension from a specified folder into SQL Server. Each CSV file is converted into a separate table where the filename (minus extension) determines the table name and the first row is used as the column headers.Requirements & Constraints:
- SQL Server Version: Requires SQL Server 2017 or later.
- Permissions: The SQL Server service account must have read access to the target folder. Avoid using user profile folders (e.g.,
C:\Users\...); use shared locations likeC:\data\csv_files. - Authentication: Valid Salesforce credentials are required for license validation, though the process only accesses SQL Server data.
Key Features:
- Automatic Schema Inference: Detects types such as INT, FLOAT, DATETIME, BIT, and NVARCHAR.
- Batch Processing: Processes all CSVs in a folder in one operation.
- Error Recovery: Continues processing remaining files even if individual files fail.
- Deduplication: Automatically handles duplicate column names by adding suffixes (e.g., _1, _2).
Compare NULL and empty string handling across Salesforce APIs
Speediful handles NULLs and empty strings differently depending on the API used and the configuration of the
@ignore_nullsparameter. Note that Salesforce does not have a native 'NULL' concept; fields are either blank/empty or contain a value.Value Type Bulk APIs (v1 & v2) SOAP (@ignore_nulls=0) SOAP (@ignore_nulls=1) NULL Blanks field Blanks field Preserves data on update / Default values on insert Empty string ('') Preserves data on update / Default values on insert Blanks field Blanks field '#N/A' string Blanks field Sets field to '#N/A' Sets field to '#N/A' Whitespace/NBSP Writes to SF Writes to SF Writes to SF Query Salesforce objects using SLAM_query_soap
TheSLAM_query_soapcommand utilizes the Salesforce SOAP API to retrieve records. It is recommended for smaller volumes of records, such as small tables or highly selective filters. If only an sObject name is provided as the query, the command returns all fields and records for that object.