Speediful Documentation

website·Indexed 30 days ago

https://docs.speediful.com

Documentation 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.

Tokens
28.7K
Snippets
114
Records
184
Agent score
49%

What's inside Speediful

  1. Overview of Speediful SQL Server and Salesforce Integration

    Speediful is a specialized integration tool designed to enable direct data exchange between a SQL Server database and Salesforce.
  2. Perform large data loads into Salesforce using SLAM_load_bulkv2

    The SLAM_load_bulkv2 stored procedure allows Salesforce to orchestrate large data loads. It supports several operation types: insert, update, upsert, delete, and hardDelete.

    Critical Requirement: The @externalId parameter 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. For delete and hardDelete operations, the @externalId must be set to 'Id'.

  3. 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_connection command, where the @auth_method parameter determines the authentication flow.

    MethodDescriptionKey Requirements
    JWT BearerOAuth 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 TokenUsername, 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.

  4. Export multiple SQL Server tables to CSV using SLAM_tables_to_csv

    SLAM_tables_to_csv is 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 the SLAM_Activity_Log table 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.
  5. Load data into Salesforce using the SLAM_load procedure

    The dbo.SLAM_load procedure 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 @api parameter, allowing for dynamic API selection.
  6. Export a SQL Server table to CSV using SLAM_table_to_csv

    SLAM_table_to_csv is 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_Log table if configured.
  7. Perform large data loads using SLAM_load_bulk

    The SLAM_load_bulk procedure 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.
  8. Load Salesforce data using SLAM_load_soap

    The SLAM_load_soap stored 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_options parameter.
  9. Profile SQL Server tables using SLAM_Alpha_profile_data

    SLAM_Alpha_profile_data is 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.

  10. Import CSV files into SQL Server using SLAM_Alpha_import_csvs

    The dbo.SLAM_Alpha_import_csvs stored procedure imports all files with a .csv extension 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 like C:\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).
  11. 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_nulls parameter. Note that Salesforce does not have a native 'NULL' concept; fields are either blank/empty or contain a value.

    Value TypeBulk APIs (v1 & v2)SOAP (@ignore_nulls=0)SOAP (@ignore_nulls=1)
    NULLBlanks fieldBlanks fieldPreserves data on update / Default values on insert
    Empty string ('')Preserves data on update / Default values on insertBlanks fieldBlanks field
    '#N/A' stringBlanks fieldSets field to '#N/A'Sets field to '#N/A'
    Whitespace/NBSPWrites to SFWrites to SFWrites to SF
  12. Query Salesforce objects using SLAM_query_soap

    The SLAM_query_soap command 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.