12
votes
Accepted
Bulk API Error: UNABLE_TO_LOCK_ROW:unable to obtain exclusive access to this record or 124 records
A great resource for understanding row locking situations is the Record Locking Cheat Sheet (PDF link). Note at the top of page 2 that insert, update, and delete of Opportunities locks the parent ...
11
votes
Accepted
BulkAPI vs Dataloader?
1) If I need to load 10,000,000 (10 million) records into salesforce, Can I use Dataloader and select the 'Use Bulk API' option on settings screen?
The data loader supports any size file that your ...
11
votes
Accepted
NUMBER_OUTSIDE_VALID_RANGE: value outside of valid range on numeric field: 100.0
Precision is the total number of digits allowed both left and right of the decimal, and scale is the number of digits to the right of the decimal. The number of digits just to the left of the decimal ...
9
votes
Accepted
Bulk API and Static Variable State
Has anyone else experienced this?
I have and to say it was quite annoying was an understatement. I had to call an update trigger either after it was inserted or after it's second update. I got it to ...
9
votes
Accepted
Uploading 100,000 binary files as attachments to Case record - best approach
I would suggest you to go with data loader using SOAP API, which is by default (not Bulk API).
Why?
You do not need to write any code to use Data loader
It is tested solution, so no bugs
With ...
7
votes
Accepted
A Few API Related Doubts
The bulk API is ideally for much larger than 1500 records.
Like you state, in cases where there are 100k of records a typical use of the SOAP API would quickly begin to eat away at the daily API ...
7
votes
Accepted
How to retrieve compound fields like address using Bulk API?
There is a clue in this help page on compound fields:
Compound fields can't be included in Bulk queries. Use the individual field components to access or update field values.
It turns out that you ...
6
votes
Accepted
What is the maximum time limit whithin which we can add batches to the Bulk data load using Bulk API
The Bulk API Limits states:
You can submit up to 5,000 batches per rolling 24 hour period. You can't create new batches associated with a job that is more than 24 hours old.
Additionally, the job ...
6
votes
Accepted
Bulk Data Load jobs very slow; what's holding up the queue?
The Bulk API operates like other asynchronous features, such as the Metadata API, Batchable classes, Sandbox refreshes, and so on. It goes in to a queue and is processed as resources allow. If you ...
6
votes
bulk api text/csv CRLF error
change the Request body of Job Creation as follows.
{
"operation" : "insert",
"object" : "Product2",
"contentType" : "CSV",
"lineEnding" : "LF"
}
It worked for me.Also ensure that the ...
6
votes
Does Salesforce Bulk API 2.0 accept JSON as the contentType?
Looking at the Bulk API 2.0 documentation, it does not support any other contentType except for CSV. Below is the excerpt from the documentation:
The content type for the job. The only valid value (...
6
votes
Accepted
How can I monitor the bulk API limit?
Call the Limits API with a GET request:
GET /services/data/v45.0/limits
Your response map will include
"DailyBulkApiRequests" : {
"Max" : 10000,
"Remaining" : 10000,
}
as well as a ...
6
votes
Accepted
Bulk API Upserting Datetime fields - Time is Off By Inconsistent Number of Minutes
It's those microseconds in your datetime: .920634.
The Salesforce API generally accepts milliseconds (.123) in ISO8601 date times, although they also sometimes get truncated on insert to .000. What ...
5
votes
Accepted
Exporting entire database via API
Proceeding with apex, describe and SOQL will make it slower and in my experience it will rather add new bottlenecks and problems than remove existing.
On thing you try is the weely export feautre to ...
5
votes
Accepted
Are salesforce reports persistent objects on the database?
My understanding is that Report object in salesforce store information about the report like name , developername, Description. however reports object and columns are stored in metadata . We can't use ...
5
votes
Accepted
Specify large set of IDs in SOQL query
Edit: The new SOQL limit is 100,000 characters, but you only get 4,000 characters for the where clause in the new limits. You'll definitely want to use the retrieve call (now available in REST) to get ...
5
votes
Can't I use ALL ROWS in asynchronous Salesforce queries?
It sounds like there was a discussion with someone in Salesforce that the Bulk API wasn't the right tool for monitoring deleted records.
There is always the Data Export functionality. It's kind of ...
5
votes
Accepted
Error desearlizing JSON of type BatchInfo - Bulk API
You don't quite have the right structure. You need an outer wrapper as well.
public class BulkApiResponse
{
public List<BatchInfo> batchInfo;
}
Now you can deserialize the structure:
...
5
votes
large bulk insert/delete using jsforce
Looks like that number is an intentional API Limit.
From the Bulk API Documentation:
Batch size
Batches for data loads can consist of a single CSV, XML, or JSON file that is no larger ...
5
votes
Accepted
Setting the batch size via Bulk API
The Bulk API is intended to load large numbers of records in parallel asynchronously. It also has really small daily limits. You could technically set up 10,000 batches of 1 record each, but then you'...
5
votes
Accepted
REST api to upload multiple notes and attachments at once
Yes, there are a few ways to upload files. You can use the API you referenced in your question (the "create new records" API), and you can also upload using a multipart upload.
For the first ...
5
votes
Accepted
Will Bulk API be affected by System.isBatch()?
No, it won't. Processing of records in a Bulk API job is not treated as an Asynchronous Apex context. The System.isBatch() method
Returns true if a batch Apex job invoked the executing code, or ...
4
votes
REST OAuth connection for Bulk API queries
The Session ID that you get from any login source (SOAP or REST API) is generally compatible with any API that accepts such a Session ID (SOAP, REST, Metadata, Bulk, Streaming, etc). However, that ...
4
votes
Salesforce large query conditions: query 20000 contacts by emails and update fields
Problem is that the email field is NOT necessarily unique. So even the VLOOKUP may end up in matching many ids for one email.
If you would have the email in an external unique id field, you could ...
4
votes
How many batches can be created in a JOB via Bulk API?
Daily limit, not per job:
You can submit up to 5,000 batches per rolling 24 hour period
Source: http://sforce.co/1avfW6t
A job can be active for 24 hours, so the amount of batches created for a ...
4
votes
Accepted
Bulk data API: How to Avoid Upserts
Upserts are slower than the relevant operations, but the actual time used depends on your strategy. Inserts are faster than upserts on all new records, updates are faster than upserts on all existing ...
4
votes
Will Trigger and Workflow get fired while using Bulk API
Triggers and Workflows will fire irrespective of the API you are using.
Form the link that you have shared please go to the section:
Triggers
Although the flexibility of triggers is a great asset, ...
4
votes
Accepted
How to check records source in Trigger?
I suggest that you create a specific User for this bulk load process that is not used for any other purpose. Then your trigger can base its conditional logic on that:
if (UserInfo.getUserName() == '...
4
votes
Why I can't change OwnerId to null or empty?
All Records in Salesforce must have an Owner which is either a User or a Queue, if you try and set OwnerId to Null or blank "", this will always fail as the field is mandatory therefore Null is not an ...
4
votes
Accepted
Bulk-API insert with sObject Tree
The sObject tree is only for the REST API, not the Bulk API. While they both use a REST-ful nature, only the REST API supports the sObject tree. This generally means you have to upload records in ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bulk-api × 373rest-api × 52
apex × 45
api × 38
data-loader × 28
soap-api × 18
soql × 17
java × 17
trigger × 16
integration × 16
batch × 14
bulk × 13
upsert × 12
query × 11
data × 11
attachment × 10
bulk-api-v2 × 10
error × 9
csv × 9
c# × 8
python × 8
workbench × 7
data-migration × 7
metadata-api × 6
rest × 6