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.

95 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
1answer
2k 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....
4
votes
0answers
66 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 ...
4
votes
0answers
210 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/...
4
votes
0answers
168 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 ...
4
votes
0answers
2k 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 ...
4
votes
0answers
548 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 ...
4
votes
1answer
533 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. ...
4
votes
2answers
427 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: ...
3
votes
2answers
481 views

BULK API cURL commands to GET 100k records from Account

curl "https://xxx.salesforce.com/services/data/v35.0/query/?q=SELECT+Id,+Name,+Phone+FROM+Account" -H "Authorization: Bearer <access token> " But this only fetching 2000 records. I need all ...
3
votes
0answers
667 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 ...
3
votes
0answers
3k 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 ...
3
votes
0answers
474 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 ...
2
votes
0answers
67 views

Is there a way to delete >1 Million records from a custom Big Object?

First thing that came to my mind was writing a Batch Apex to do this but I get this error. System.UnexpectedException: The requested operation is not supported by this SObject Deleting via Bulk API ...
2
votes
0answers
58 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 ...
2
votes
0answers
182 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 ...
2
votes
1answer
97 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" ...
2
votes
0answers
499 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-...
2
votes
0answers
42 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.
2
votes
0answers
33 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 ...
2
votes
1answer
203 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 ...
2
votes
0answers
474 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);...
2
votes
0answers
212 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/...
1
vote
0answers
59 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 ...
1
vote
0answers
33 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 ...
1
vote
2answers
100 views

Populating Big Objects from CSV

I need to create a client application where users can upload CSV files, which will then be used to populate Custom Big Objects. My problem is I'm not sure which API to use. The Salesforce ...
1
vote
0answers
102 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 ....
1
vote
1answer
135 views

How to upload ContentVersion records using BulkAPI?

So I've been trying to follow the sample java app provided in the documentation to write some Java code to upload ContentVersion records (files) into Salesforce using the Bulk API. It should be so ...
1
vote
0answers
59 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 ...
1
vote
0answers
87 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'...
1
vote
0answers
339 views

Bulk API v2.0 Failed records are confused

I'm developing code in java for upload data to Salesforce. All did fine but I've a problem with failed records with bulk API 2.0 with upsert action I have the next file csv for upload data for ...
1
vote
0answers
30 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, ...
1
vote
1answer
526 views

Push & pull data with sfdx commands

We were trying to export & import data from a sandbox using the sfdx tree export command. Even after going through the different links on google I could not understand how will we export a ...
1
vote
1answer
183 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 ...
1
vote
0answers
145 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'.): ...
1
vote
0answers
64 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 ...
1
vote
0answers
17 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 ...
1
vote
0answers
128 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 ...
1
vote
0answers
193 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: ...
1
vote
0answers
1k 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 ...
1
vote
0answers
67 views

Which tools\techniques are you using to improve performance of mass deletion of custom object records?

We have a custom object with about 40 million records. We have identified about 18 million that we are going to delete forever. All of this data is permanently retained in an Oracle backup so we are ...
1
vote
0answers
76 views

Monitor Import Wizard Job Status?

Is there a way to check Status of 1st Batch job every 5 mins by using 2nd batch job? Here 1st batch job internally uses 'Import Wizard' to load/Delete records and everything handles in Salesforce ...
1
vote
0answers
357 views

Better way to truncate all entries of a Salesforce Object through API

I want to recreate all entries of a Custom object from external source everyday. Currently I am using BULK API and if I need to do a full refresh, I follow the following steps: Query Id of all ...
1
vote
0answers
55 views

Is Salesforce supports or provides Bulk API for SAP? Any experts suggestions please

Bulk API documentation has given sample code in Java. We have a need where we need to load huge volume of data from SAP to Salesforce. Had tried using SOAP and RESTful services but ended with hitting ...
1
vote
0answers
408 views

Process Builder Flow fails when using BulkAPI

I have created a simple flow in Process Builder. The flow works fine for all scenarios that I test manually by updating Objects. However, when I use the BulkAPI with a large amount of records (100+) I ...
1
vote
0answers
72 views

Get API URL for BulkConnection

Is there a "right" way to get the correct endpoint for establishing a BulkConnection (force-ws.jar)? I'm calling an external app from a visualforce page (already authenticated, passing session & ...
1
vote
1answer
60 views

What is the best practice method to summarize contact information to leads?

Here's the business case. I want to have a reportable field on a lead that displays the number of contacts for, say, a city field match. This value could be used in reports, dashboards, snapshots, ...
1
vote
0answers
177 views

Bulk API queue and REST API actions, any way to ensure sequence?

I have an app that perform some bulk operations but also requires real time updates for single records. I was thinking if there is a way to ensure that once the bulk action has been queued, any REST ...
1
vote
0answers
150 views

Using Bulk API on iOS, any library or sample project?

I decide to use bulk api to push all data on my iOS application to salesforce periodically. I have read throw the Bulk API document. It provides some sample code in java using salesforce libraries. I ...
0
votes
0answers
24 views

how to query job batches info bulk api 2.0

Before, using bulk api 1.0 endpoint. I could make request to get all job's batches like so: ` req.setEndpoint('callout:BulkApi' + '/' + jobId + '/batch'); req.setMethod('GET'); req.setHeader('...
0
votes
1answer
21 views

Does bulk api 2.0 support deletion of data?

Salesforce documentation is contradictory. In documentation of Bulk API 1.0 it is mentioned that Use Bulk API 2.0 instead of Bulk API if you want a simplified process for inserting, updating, ...