Skip to main content

Questions tagged [bulk-api]

Bulk API is based on REST principles and is optimized for loading or deleting large sets of data. You can use it to query, insert, update, upsert, or delete a large number of records asynchronously by submitting batches which are processed in the background by Salesforce.

126 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9 votes
2 answers
5k views

Problem creating Job in Bulk API

I have been successfully able to use REST API for my application but I found that Bulk API will be better for my application. So, now I am trying to switch to Bulk API but I am stuck at the first step....
Manoj's user avatar
  • 91
4 votes
0 answers
800 views

Bulk data load jobs missing batches and stuck in Open state

I am having a problem with Bulk Data Load Jobs where they seem to be submitted without Batches and as such appear to get stuck in Open state until they are manually Aborted. This is similar to a ...
felix's user avatar
  • 41
4 votes
0 answers
89 views

SOQL query results differ on selecting from varying columns

I'm querying on Contact object where the results are varying on Bulk API vs querying on developer console. Total records on Contact is 997820. Query on developer console: select count(id) from ...
dmachop's user avatar
  • 1,089
4 votes
0 answers
1k views

Salesforce Bulk API v2.0 INVALID_SESSION_ID

Following the Salesforce Bulk API v2.0 documentation at: https://developer.salesforce.com/docs/atlas.en-us.api_bulk_v2.meta/api_bulk_v2/walkthrough_upload_data.htm https://developer.salesforce.com/...
Sebi's user avatar
  • 213
4 votes
0 answers
243 views

Upserting objects with many to many relationship using api

I am writing a script to run on a schedule to automatically import data from our accounting software into salesforce using their API. I cannot find a good way to upsert objects with many to many ...
Jose Castellanos's user avatar
4 votes
0 answers
3k views

Salesforce Bulk API upsert - Error: ENTITY_IS_DELETED

I am trying to restore a custom object from my backup where I am trying to upsert the records. Following this example. The external field is Id here. Assuming that there are no records matching, the ...
dmachop's user avatar
  • 1,089
4 votes
0 answers
918 views

Unsupported Content Type while using curl

We are currently working on with bulk api to load json data's into salesforce.But unfortunately we are not able to load it and getting error as unsupported content type does salesforce currently ...
Priyalakshmi's user avatar
  • 1,456
4 votes
1 answer
795 views

BULK API -PK Chunking Header Query - job content type : application/xml

Is it possible to use PK Chunking Header for a Query job of type XML. It works with CSV and when i pass it for xml jobs it fails and gives this error InternalServerError : PKChunking failed. ...
User's user avatar
  • 41
4 votes
2 answers
864 views

Retrieve ActivityHistory via Bulk API?

I'm trying to download all of the ActivityHistories from our SFDC account. I would like to use the Bulk API to avoid hitting the API rate limit for the day. I'm using the following query to do so: ...
sgrove's user avatar
  • 141
3 votes
1 answer
489 views

Identify areas where Bulk API V1 is used in org

I am looking into impact of upgrading Bulk API V1 to V2. First, I have to identify areas where Bulk Api V1 is leveraged. But I am not sure what are things I should check. So, what all process should I ...
devforce's user avatar
  • 1,573
3 votes
1 answer
1k views

Performance of query job using Bulk API V1 vs Bulk API v2

I am currently using Bulk API v1 query job to extract data out of Salesforce. In this case by using pkChunking, extract job of 150k records completes within 30-40 seconds. However, now when I am ...
Akshay's user avatar
  • 77
3 votes
0 answers
3k views

Workbench returning Heroku application error when trying to download bulk api job results

I ran a bulk csv job via Workbench (workbench.developerforce.com), and it appears to have run successfully. There are two files to download, one (the second one) downloads fine but the first one ...
user87363's user avatar
3 votes
0 answers
1k views

Why doesn't Dataloader use specified 10k batch size when Bulk API is selected?

I have this sample CSV file containing 10,000 records (with 33 columns) I'd like to import it via Dataloader into Case object at my sandbox environment. I tried using these settings below with Bulk-...
compski's user avatar
  • 1,352
3 votes
0 answers
1k views

BULK Api - Invalid Session ID for Valid oAuth2 Token

Hi I am building Salesforce app which authenticate users using oAuth2. When user complete authentication I am receiving access_token. When I use this token with REST API it works perfectly fine. When ...
zachu's user avatar
  • 179
3 votes
0 answers
5k views

Why we get "input stream can not be null" error while implementing Bulk API

i tried implementing an example of bulk api provided at link : http://code.google.com/p/sfdc-bulkapi-demo/source/browse/trunk/demo/src/com/jeffdouglas/BulkLoader.java At run time, i am getting ...
Peace's user avatar
  • 53
3 votes
0 answers
568 views

SalesForce Bulk API: query relation on another custom object external id

I want to run a simple select query on a table, and include externalids of entities rather than salesforce ids... This is my soql query normally works to select external id of User object : Select ...
tugce's user avatar
  • 131
2 votes
1 answer
984 views

Bulk query from SFDX CLI - How to get all results

I'm querying a large (1+ million) number of records from the SFDX CLI: sfdx force:data:soql:query \ --targetusername '[email protected]' \ --soqlqueryfile "my_query.soql" \ --...
soapygopher's user avatar
2 votes
0 answers
186 views

Determining case of a Bulk API *query* Failure

For a particular query: I am initiating a query via the Bulk API v2 at /services/data/v47.0/jobs/query. I use the job id to query the status via /services/data/v47.0/jobs/query/jobId, repeatedly once ...
Tony BenBrahim's user avatar
2 votes
0 answers
378 views

Salesforce Bulk API Failing Journey Builder Process Builder

For Context: The Salesforce Org is connected to SFMC via MC Connect. We are writing Bulk API to perform ETL on Opportunity/Lead/Account Objects in Salesforce. In Marketing Cloud there are journeys ...
PrinceTiwari's user avatar
2 votes
0 answers
496 views

How to interpret bulk API processing times

According to the docs apexProcessingTime is The number of milliseconds taken to process triggers and other processes related to the job data apiActiveProcessingTime is The number of milliseconds ...
Dwarakesh Pallagolla's user avatar
2 votes
1 answer
505 views

Bulk API vs Bulk API 2.0 Query Length

We've been using the BulkAPI (XML/SOAP) successfully for several months now and were looking to migrate over to the BulkAPI v2.0. However, when submitting a job (queryAll) to the 2.0 API we're ...
harlow's user avatar
  • 121
2 votes
0 answers
494 views

How do I get the record ID's for a bulk data insert using sfdx CLI?

I'm trying to use sfdx-cli to perform bulk-insert jobs, but can't find a way to access the batch results on a per row level. I see that the command force:data:bulk:status informs you of how many ...
user9531439's user avatar
2 votes
1 answer
212 views

CORS Support for Bulk API

According to this documentation, the bulk API should now support CORS. However, I'm not finding that to be the case. My the preflight request (OPTIONS) is failing with: <?xml version="1.0" ...
NSjonas's user avatar
  • 10.2k
2 votes
0 answers
3k views

Why do I get "ClientInputError - exceptionMessage='Server error returned in unknown format' while using Bulk Query

I am using Bulk Query, reading one batch at a time, and writing to the standard output. When the records size is small like 100000 records, the job works fine, but when I try to extract records like ...
Deepak Naik's user avatar
2 votes
0 answers
236 views

I want to know If I can create a report or alert on Bulk API Jobs whenever a Job has Failed

I want to know If I can create a report or alert on Bulk API Jobs such that whenever a Job has Failed. If we can create a VF page then on which standard controller I can start with.
sfdc rowdy's user avatar
2 votes
0 answers
52 views

Posting Pdf to chatter via bulk api?

Which object should we use to post data's to chatter?I am trying to post a pdf file to a chatter object using curl. What is the name of the object that we should specify in txt file? <?xml ...
Priyalakshmi's user avatar
  • 1,456
2 votes
1 answer
456 views

Is it possible to get Query AsyncApiBatch in salesforce (in SOQL)

Is it possible to get Query AsyncApiBatch in salesforce (in SOQL), I am trying to get this information so that external app could understand how many batches are consumed in last 24 hours and how many ...
Prafulla Patil's user avatar
2 votes
0 answers
633 views

Bulk API getUpdated contacts

Is there a way to get updated contacts from salesforce with Bulk API. With SOAP API I can write it like this: SforceService binding; // login .... binding.getUpdated("Contact", startDate, endDate);...
broadband's user avatar
  • 121
2 votes
0 answers
218 views

Placing external data onto Salesforce.com platform?

I've been trying to follow the link shown below to upload data via the bulk API tutorial from my external website onto the Salesforce.com platform: http://www.salesforce.com/us/developer/docs/...
user1871869's user avatar
1 vote
0 answers
10 views

DataLoader CSV Bulk API not loading field values if first processed record does not have all fields populated

Has anyone else ran into issues using DataLoader where if the first row of the CSV file that is loaded successfully does not have values for every possible field in the file, it will fail to load? For ...
SCVandal's user avatar
1 vote
0 answers
47 views

Did the bulk 2.0 query change how it batches over the weekend and how do I fix it?

We have been doing a bulk v2 query for a long time now and suddenly saturday morning (May 25, 2024) it began behaving differently. Prior to saturday each query would create 2 total batches, one with 0 ...
Ahowell's user avatar
  • 25
1 vote
1 answer
111 views

What governs the longevity/availability of Bulk Data Load Job batch View Request and View Result links?

In pushing Bulk Data Load Jobs via Mulesoft, I've relied heavily on being able to inspect the results of jobs as they run via the Bulk Data Load Job Detail page in the Auto-Chunked Batches section. ...
J. Hochberg's user avatar
1 vote
0 answers
1k views

BulkAPI v2 with python fails while the same request with postman works fine

I am trying to get some query results using bulk api from Python. I have been able to get the token but I run into an error when I try to create the batch job based on documentation but I run into ...
N_H1922's user avatar
  • 315
1 vote
0 answers
220 views

transform records from jsforce bulk api query

I am trying to modify the results of a query that uses the bulk api by using the recordStream.on('record',...) function. I've stepped through the code but it making modifications here (or in other ...
ben's user avatar
  • 11
1 vote
1 answer
846 views

Using C#, how can I get a jobId for Bulk Api 2.0?

I am trying to set data from an Azure Service Bus to an instance of Salesforce using the Bulk API 2.0 and and REST (because who really wants to deal with SOAP?). I am currently struggling "simply&...
Brian Kessler's user avatar
1 vote
0 answers
64 views

Bulk Query with PK Chunking via WSC -- error reading extracted records with CSVReader

I'm having an issue with the CSVReader class in the Salesforce WSC. The error I get when trying to read the contents of a batch is "com.sforce.async.CSVReader$CSVParseException: Found unescaped quote. ...
sfdcburger's user avatar
1 vote
0 answers
985 views

Salesforce Bulkv2.0 job failed with error message: Failure writing to File store

I executed a bulk job using the Salesforce Bulkv2 API. Operation: Upsert Status: Failed State Message: Failure writing to File store I can't find information on this error and am wondering what ...
Whatamidoing's user avatar
1 vote
0 answers
501 views

Bulk Job Status - Failed vs Not Processed?

What are the use cases for setting a Bulk (version 1) job to a status of Failed vs Not Processed? Salesforce documentation gives the same description for both The batch failed to process the full ...
joynoele's user avatar
  • 146
1 vote
0 answers
815 views

Python-driven Bulk API 2.0 hardDelete yields "errorMessage": "InvalidBatch : InvalidBatch : The 'delete' batch must contain only ids"

I am trying to write a bit of python code to permanently delete some records using the Salesforce.com Bulk API v2. Using curl, I have success. I: create an Bulk API 2 hardDelete job PUT the file to ....
Kurt Buckardt's user avatar
1 vote
0 answers
155 views

Staggered query of Salesforce bulk api from Ruby

I'm trying to do a staggered query using the Bulk API from a RoR app since the filter (WHERE App_Id__c IN :listOfIds) I'm using is over 4000 chars. The list of IDs I'm filtering on is quite long, so ...
McD's user avatar
  • 1,266
1 vote
0 answers
686 views

Record with duplicate external id was inserted through bulk API upsert

I have Account with user id as external id. I have a record of Account with user id 123 created 2 months ago. I have an upsert job created through bulk API yesterday with user id as ...
Vera's user avatar
  • 73
1 vote
0 answers
177 views

OAuth2.0 returns unreachable instance_url

We've run into a very interesting (and frustrating!) problem while onboarding a customer whose Salesforce instances are on the *.cloudforce.com domains. Our app uses OAuth2 to connect with our clients'...
nansari's user avatar
  • 11
1 vote
0 answers
102 views

Getting error "No session Id received from SFDC". Does anything changed in Spring/Winter releases?

We have integrated SAP and Salesforce system where customer data is being pushed from SAP to Salesforce. We have used Bulk API for this purpose. The issue is, the Bulk API throws the error below, ...
Bforce's user avatar
  • 6,828
1 vote
1 answer
595 views

Using BulkAPI, how to populate multiple objects? (Account, Contact, Opportunity)

My company is loading 3rd-party data into SalesForce using the BulkAPI (Python). This data is loaded into 3 SalesForce objects: Account, Contact, and Opportunity using 'upsert' method with Account ...
Joseph's user avatar
  • 81
1 vote
0 answers
328 views

Why is the bulk API 2.0's successfulResults endpoint returning blank values in the fields from the original CSV request?

I'm starting to use the Bulk API 2.0 and am seeing an unexpected result from successfulResults. I'm uploading this CSV for an upsert operation (for this post I replaced my prefix with 'prefix'.): ...
David Sickmiller's user avatar
1 vote
0 answers
93 views

Bulk API Batch Query

I have 10 lakhs records in my salesforce contacts. Iam going to use Bulk Api to fetch all these records.How can I write a SOQL query to fetch records so I can feed the queries into the batches? And ...
killer's user avatar
  • 23
1 vote
0 answers
37 views

How to best identify the most optimum time to leverage the bulk API for large data volumes?

As per this developer document: As worker threads become available to process your Bulk API jobs, Salesforce assigns them to process specific batches. This point is emphasised further in this ...
Andy Hitchings's user avatar
1 vote
0 answers
268 views

Bulk API maximum field length measure in Java

I'm using Bulk API on Java to insert EmailTemplate records. Some errors that were caught were: InvalidBatch : Failed to parse CSV. Exceeded max field size: 51112 However, the record in question had ...
dmachop's user avatar
  • 1,089
1 vote
0 answers
298 views

PKChunking problem when using Content-Type: application/json

I have the following problem when creating a batch to a job in Salesforce and I want to enable PKChunking. I perform a POST request at /services/async/37.0/job and I am creating the job like this: ...
Laurentiu Stamate's user avatar
1 vote
2 answers
2k views

Bulk Query with PK Chunking enabled sometimes does not return all the batches

The requirement is to use Bulk Query API with PK Chunking enabled, and to create CVS files for each batch with the chunk-size For example, in the Account Object if I have 80,000 records, and have the "...
Deepak Naik's user avatar