# tSalesforceBulkExec

Bulk-loads data in a given file into a Salesforce object.

This component is not shipped with your Talend Studio by default. You need to install it using the Feature Manager. For more information, see [Installing features using the Feature Manager](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/install-features-to-talend-studio).

The tSalesforceOutputBulk and tSalesforceBulkExec components are used together in a two step process. In the first step, an output file is generated. In the second step, this file is used to feed the Salesforce database. These two steps are fused together in the tSalesforceOutputBulkExec component. The advantage of using two separate steps is that the data can be transformed before it is loaded into Salesforce.

## tSalesforceBulkExec Standard properties

These properties are used to configure tSalesforceBulkExec running in the Standard Job framework.

The Standard tSalesforceBulkExec component belongs to the Business and the Cloud families.

The component in this framework is available in all Talend products.

## Basic settings

| Properties | Description |
| --- | --- |
| Property Type | Select the way the connection details<br>will be set.<br><br><ul> <li> <p> <span>Built-In</span>: The connection details will be set                                locally for this component. You need to specify the values for all                                related connection properties manually.</p> </li> <li> <p> <span>Repository</span>: The connection details stored                                centrally in <span><span>Repository</span><abbr> &gt; </abbr><span>Metadata</span></span> will be reused by this component. </p> <p>You need to click                                the <span>[...]</span> button next to it and in the pop-up                                    <span>Repository Content</span> dialog box, select the                                connection details to be reused, and all related connection                                properties will be automatically filled in.</p> </li> </ul><br><br>This property is not available when other connection component is selected from<br>the Connection Component dropdown list. |
| Component list | Select the component that opens the database connection to be reused by this<br>component. |
| Connection type | Select the type of the connection from the drop-down list. The connection<br>properties will vary according to the connection type you choose.<br><br><ul> <li> <p><span>Basic (deprecated)</span>: This option uses the legacy                        username, password, and security token ("SOAP API login()") to authenticate                        with Salesforce. Salesforce will retire support for SOAP API login() in API                        versions 31.0 through 64.0 starting with the Summer ‘27 release, and it is                        not available in API versions 65.0 and later. As such, Basic authentication                        is deprecated and may stop working in the near future regardless of the                        selected API version.</p> </li> <li> <p><span>OAuth</span>: This option uses OAuth (Open Authorization)                        2.0 protocol to authenticate the user with the <span>Json Web Token                           Flow</span> OAuth 2.0 authentication flow type. To use this option,                        you need to create a connected app in Salesforce to configure a Salesforce                        authentication provider.</p> <p>For more information about the OAuth authentication flow, see <a href="https://help.salesforce.com/articleView?id=remoteaccess_authenticate.htm&amp;type=5" target="_blank">Authenticate Apps with OAuth</a>.</p> <p>For more information about how to create a connected app in Salesforce, see                           <a href="https://help.salesforce.com/articleView?id=connected_app_create.htm&amp;type=5" target="_blank">Create a Connected App</a>.</p> </li> </ul> |
| User Id | The Salesforce username.<br><br>This property is available only when the Basic connection type is selected. |
| Password | The Salesforce password associated with the username.<br><br>This property is available only when the Basic connection type is selected. |
| Security Token | The Salesforce security token. For more information, see [Reset Your Security Token](https://help.salesforce.com/articleView?id=user_security_token.htm&type=5).<br><br>This property is available only when the Basic connection type is selected. |
| Issuer | The OAuth Consumer Key, generated when your<br>connected app is created and shown in the connected app detail page in Salesforce.<br>For more information, see [Create a Connected App](https://help.salesforce.com/articleView?id=connected_app_create.htm&type=5).<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Subject | The Salesforce username.<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Audience | Json Web Token audience.<br><br>You can set your own Json Web Token audience.<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Expiration time (in seconds) | The expiration time of the assertion (in seconds) within five minutes.<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Key store | The path to the keystore file in Java Keystore (JKS) format.<br><br>The keystore file can be generated by creating a certificate signed by Salesforce<br>and then exporting it to keystore. For more information, see [Generate a Self-Signed Certificate](https://help.salesforce.com/articleView?id=security_keys_creating.htm&type=5).<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Key store password | The keystore password.<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Certificate alias | The unique name of the certificate signed by Salesforce.<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Mutual authentication | Select this option to enable mutual authentication for establishing connections to<br>Salesforce. For more information about mutual authentication in Salesforce, see<br>[Set Up a Mutual Authentication<br>Certificate](https://help.salesforce.com/s/articleView?id=sf.security_keys_uploading_mutual_auth_cert.htm&type=5).<br><br>If you are using this option:<br><br><ul> <li> <p>On the component side, use a <a href="https://help.qlik.com/talend/r/en-US/8.0/components/keystore/tsetkeystore">tSetKeystore</a> component to                           provide the mutual authentication keystore and keystore password.</p> </li> <li>On the metadata side, go to <span><span>Window</span><abbr> &gt; </abbr><span>Preferences</span><abbr> &gt; </abbr><span>Talend</span><abbr> &gt; </abbr><span>Security</span><abbr> &gt; </abbr><span>SSL</span></span>, and set the corresponding keystore configuration.</li> </ul><br><br>By default, this option is not selected. |
| Mutual auth keystore (Deprecated) | Enter the path to the mutual authentication keystore file, a password protected<br>file containing keys and certificates.<br><br>This option is deprecated, it is recommended to use a [tSetKeystore](https://help.qlik.com/talend/r/en-US/8.0/components/keystore/tsetkeystore) component to provide the mutual<br>authentication keystore and keystore password.<br><br>This option is available when both the Basic connection<br>type and the Mutual authentication check box are<br>selected. |
| Mutual auth keystore password | Enter the password for the mutual authentication keystore file.<br><br>This option is available when both the Basic connection<br>type and the Mutual authentication check box are<br>selected. |
| Module Name | Click the [...] button next to the field and in the dialog<br>box displayed, select the module that will be used or select the Use<br>custom object check box and specify the module name in the<br>Object Name field. |
| Schema and Edit schema | A schema is a row description. It defines the number of fields<br>(columns) to be processed and passed on to the next component. When you create a Spark<br>Job, avoid the reserved word line when naming the<br>fields.<br><br>Click Edit<br>schema to make changes to the schema. If the current schema is of the Repository type, three options are available:<br><br><ul> <li> <p> <span>View schema</span>: choose this                option to view the schema only.</p> </li> <li> <p> <span>Change to built-in property</span>:                choose this option to change the schema to <span>Built-in</span> for local changes.</p> </li> <li> <p> <span>Update repository connection</span>:                choose this option to change the schema stored in the repository and decide whether                to propagate the changes to all the Jobs upon completion.</p> <p>If you just want to                propagate the changes to the current Job, you can select <span>No</span> upon completion and choose this schema metadata                again in the <span>Repository Content</span>                window.</p> </li> </ul><br><br>Click Sync<br>columns to retrieve the schema from the previous component connected in the<br>Job.<br><br>This component offers the advantage of the<br>dynamic schema feature. This allows you to retrieve unknown columns from source<br>files or to copy batches of columns from a source without mapping each column<br>individually. For further information about dynamic schemas, see [Dynamic schema](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/dynamic-schema).<br><br>This<br>dynamic schema feature is designed for the purpose of retrieving unknown columns of a<br>table and is recommended to be used for this purpose only; it is not recommended for the<br>use of creating tables. |
| Output Action | Select one of the following operations to be performed from the drop-down list.<br><br><ul> <li> <p> <span>INSERT</span>: insert one or more new records into                        Salesforce.</p> </li> <li> <p> <span>UPDATE</span>: update one or more existing records in                        Salesforce.</p> </li> <li> <p> <span>UPSERT</span>: create new records or update existing                        records. In the <span>Upsert Key Column</span> field displayed,                        specify the key column for the upsert operation. By selecting                           <span>Output upsert column</span>, a column named                           <span>UpsertColumnValue</span> will be added to the output                        schema. The column holds upsert key values and thus can be used to monitor                        the upsert key. You can select <span>Output upsert column</span>                        if the upsert key is a variable.</p> </li> <li> <p> <span>DELETE</span>: delete one or more records in Salesforce.</p> </li> </ul> |
| Bulk File Path | Specify the path to the file that stores the data to be processed. |
| Content type | Select the format of the file to load data from.<br>Currently, two file formats are supported: JSON and CSV.<br>Because Bulk API 2.0 does not support JSON format, do not select the<br>Bulk API V2 option in the<br>Advanced settings view if you<br>want to load data from a JSON file. |

## Advanced settings

| Properties | Description |
| --- | --- |
| Salesforce URL | The Webservice URL required to connect to Salesforce.<br><br>Information noteWarning: Due to a [breaking change](https://help.salesforce.com/s/articleView?id=release-notes.rn_security_mutual_authentication.htm&release=246&type=5) in the latest versions of<br>Salesforce, if you use the Basic connection type with<br>mutual authentication, you need to adjust the endpoint to prevent errors while<br>running the Job. Example:<br>https://MyDomainName.my.salesforce.com:8443/services/Soap/u/version |
| API version | The Salesforce API version.<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Need compression | Select this check box to activate SOAP message compression, which can result in<br>increased performance levels. |
| Trace HTTP message | Select this check box to output the HTTP<br>interactions on the console. |
| Client Id | Enter the ID of the real user to differentiate between those who use the same<br>account and password to access the Salesforce website. |
| Timeout | Enter the intended number of query timeout in milliseconds in Salesforce. |
| Use Proxy | Select this check box to use a SOCKS proxy server, and in the<br>Host, Port, User<br>Id, and Password fields displayed, specify<br>the connection parameters of the SOCKS proxy server.<br><br>Information noteNote: To use a proxy of any allowed type (including HTTP proxy, HTTPS proxy, and<br>SOCKS proxy), use the tSetProxy component. |
| Bulk API V2 | Select this check box to create a Bulk API V2 Job, and then select a type of field<br>delimiter from the Column Delimiter drop-down list and a<br>way of line ending from the Line Ending drop-down list<br>respectively for CSV data.<br><br>Compared with Bulk API V1, Bulk API v2 simplifies the way of processing data.<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Concurrency Mode | Select the concurrency mode for the Job.<br><br><ul> <li> <p> <span>Parallel</span>: process batches in parallel mode.</p> </li> <li> <p> <span>Serial</span>: process batches in serial mode.</p> </li> </ul> |
| Rows to Commit | Specify the number of lines per data batch to be processed. |
| Bytes to Commit | Specify the number of bytes per data batch to be processed. |
| Wait Time Check Batch State | Specify the wait time (in milliseconds) for checking whether the batches in a Job<br>have been processed until all batches are finally processed. |
| Safety Switch | Clear this check box if the length of any column of the module to be queried is<br>longer than 100,000 characters. By default, this check box is selected to prevent<br>excessive memory usage.<br><br>This property is available when Bulk or<br>BulkV2 is selected from the Query<br>Mode drop-down list. |
| tStatCatcher Statistics | Select this checkbox to gather the Job processing metadata at the Job level<br>as well as at each component level. |

## Global Variables

| Variables | Description |
| --- | --- |
| NB\_LINE | The number of rows processed. This is an After variable and<br>it returns an integer. |
| NB\_SUCCESS | The number of rows successfully processed. This is an After<br>variable and it returns an integer. |
| NB\_REJECT | The number of rows rejected. This is an After variable and<br>it returns an integer. |
| ERROR\_MESSAGE | The error message generated by the component when an error<br>occurs. This is an After variable and it returns a string. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | This component is more commonly used with the tSalesforceOutputBulk component. Used together, they gain performance while feeding or modifying information in Salesforce. |
| Limitation | If you change the component schema or any of the following parameters — Output Action, Upsert Key Column, or Output upsert column — click Guess Schema on Schema MAIN and Reject Schema to refresh the output schemas accordingly.<br><br>Information noteNote: This behavior will be improved in a future release to support automatic schema updates. |