Skip to main content

Best Practices

Data Preparation

  • Always use the template procedure to create properly structured tables
  • Ensure your data tables include all required fields for the operation
  • Use appropriate data types that match Salesforce field definitions

API Selection Guidelines

  • bulk: Invokes Bulk v1 API; best for large datasets (>30,000 records), supports parallel processing
  • bulkv2: Invokes Bulk v2 API; a modern alternative to Bulk API, simpler controls
  • soap: Invokes SOAP API; best for smaller datasets (<30,000 records) or when you need precise control over system behavior
  • blob: For loading files
  • LockBuster: special data loading procedure; best for eliminating lock errors on junction tables and record volumes >100,000

Performance Tips (Loading)

  • Use appropriate batch sizes for data loading:
    • Bulk API: 10,000 records per batch
    • Bulk v2 API: Automatically optimized
    • SOAP API: 200 records per batch
  • Enable parallel processing for Bulk v1 operations when possible

Performance Tips (Query)

  • Use PK Chunking for very large queries when supported (>200,000 records)

Error Handling

  • All procedures throw error 883xx if the operation fails
  • Check the command output for detailed error messages
  • Results are written back to your source table with success/error indicators

Security Recommendations

  • Remove Salesforce connections that are no longer needed
  • Use appropriate Salesforce profiles and permission sets