Skip to main content

Pentaho+ documentation has moved!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

Salesforce bulk operation

 

You can use the Salesforce bulk operation step to perform bulk mutative operations (insert, update, upsert, and delete) on Salesforce objects using the Salesforce Bulk API 2.0. This is accomplished by reading data from a stream, buffering a CSV file of mutations, and then executing the bulk job on the buffered file. Upon completion, you can optionally retrieve the successful results, unprocessed records, and failed results on different output streams of the step. You must have a Salesforce Client ID and Client Secret to use this step.

General

 

Enter the following information in the transformation step name field:

  • Step name: Specifies the unique name of the Salesforce bulk operation transformation step on the canvas. You can customize the name or leave it as the default.

Options

 

The Salesforce bulk operation step requires you to specify options and parameters in the Connection, Operation, Fields, and Advanced tabs. Each tab is described below.

Connection tab

 

Use this tab to provide the credentials to connect to Salesforce. The Client id and Client secret are used for the service account, and the Username and Password credentials provide the user that the service account impersonates.

PDI Salesforce bulk operation step Connection tab
Field Description
OAuth2 login endpoint The endpoint to retrieve a token from Salesforce.
Client id Client identifier required to get the authentication token from the Salesforce Oauth endpoint. This is set up in Salesforce.
Client secret Client Secret credential required to get the authentication token from the Salesforce Oauth endpoint. This is set up in Salesforce.
Username Specify the username for authenticating to Salesforce.
Password Specify the password for authenticating to Salesforce.
Test connection Click to verify the connection can be made to the Salesforce Webservice URL you specified.

Operation tab

 

Use this tab to control the bulk operation you want to perform.

PDI Salesforce bulk operation step Operation tab
Field Description
Salesforce object type The Salesforce object type that you want the step to target.
Bulk operation

Specify the type of bulk operation you want to perform. The types are:

  • Insert
  • Update
  • Upsert
  • Delete

Some selections make additional field options appear.

Salesforce id stream field This field displays when the Update or Delete operations are selected. Use this option to select a field from the incoming rows that contains the Salesforce id of the Salesforce object in which you want to update or delete fields using the fields tab.
External id stream field This field displays when the Upsert field is selected. Specify a field from the incoming rows of the step that contains an external (indexed) id of the target object. If the external id exists in the target objects on Salesforce, the record will be updated. If the external id does not exist in Salesforce for the object type, a new object will be created.
External id object field This field displays when the Upsert field is selected. Specify a field in the Salesforce object type definition that will contain the external id to be matched with for the Upsert operation.

Fields tab

 

Use this tab to specify the target changes to make in the Salesforce object fields for Insert, Update, and Upsert operations. This tab is not available for bulk delete operations. You cannot include the external id for upsert operations. All data except for dates is converted to strings using pre-existing format masks on the Stream field.

PDI Salesforce bulk operation step Fields tab
Field Description
Stream field Specify the name of the PDI stream field containing the data for the Salesforce object.
Object field Specify the destination Salesforce object field.
Clear nulls? A Boolean value that specifies whether null values encountered on the input stream should be cleared from the target Salesforce object. Select Yes to remove the value in Salesforce, or No (Default) to leave the original value.

Advanced tab

 

Use this tab to specify buffer file options and the API version.

PDI Salesforce bulk operation step Advanced tab
Field Description
Path to buffer the bulk job payloads Specify the directory to store the temporary files. This location is also used to retrieve output records. The temporary files are automatically deleted when the step finishes.
Maximum size of a buffered payload file (in bytes) Specify the maximum number of bytes to buffer and transmit in a bulk operation job. The maximum is the default 100 MB (104,857,600 bytes). If needed, you can lower this number to prevent locking errors.
Buffer payload only (do not upload in job) Add files to the directory specified in the Path to buffer the bulk job payloads field, but do not upload them to Salesforce.
Cleanup bulk jobs once processed Select to delete the buffer files when the step finishes.
Salesforce API version Specify the Salesforce Bulk API version for your connection.
Note:To view sample transformations in the PDI client, navigate to the /design-tools/data-integration/plugins/pdi-salesforce-bulk-plugin/samples directory and open any of the following files:
  • Input SFBL.ktr
  • Delete SFBL.ktr
  • Update SFBL.ktr
  • Upsert SFBL.ktr

Metadata Injection Support

 

All fields of this step support metadata injection. You can use this step with ETL metadata injection to pass metadata to your transformation at runtime.