Why isn't my connection using the Bulk API to write to Salesforce?

Issue

My connection is using SOAP to write to Salesforce instead of Bulk, which is much slower. How can I speed this up?

Resolution

Please review the SOAP vs Bulk API documentation to ensure that you're meeting the requirements for using Bulk.

To confirm whether you are inserting consecutive changes to the same mapping, you can use this query. Note that it can be fairly slow depending on how many updates are in your _trigger_log table. If your connection uses a custom schema, change salesforce._trigger_log to <yourschema>._trigger_log in the innermost query.

select
  min(table_name) as mapping,
  min(created_at) as first_created_at,
  count(*) as consecutive_rows
from (
  select
    t1.*,
    sum(group_flag) over (order by created_at) as grp
  from (
    select
      *,
      case
      when lag(table_name) over (order by created_at) = table_name then null
      else 1
      end as group_flag
    from salesforce._trigger_log
  ) t1
) t2
group by grp
order by 2;

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support
Terms of Service Privacy Cookies © 2019 Salesforce.com