In this scenario, data in a local file is inserted to the AdditionalNumber module. Meanwhile, erroneous data in that file is collected via a Row > Reject link.
Drag and drop the following components from the Palette onto the workspace: tFileInputDelimited, tSalesforceOutput and two tLogRow components.
Rename tFileInputDelimited as DataToInsert, tSalesforceOutput as InsertToSalesforce, and the two tLogRow components as DataInserted as well as DataRejected respectively.
Link DataToInsert to InsertToSalesforce using a Row > Main connection.
Link InsertToSalesforce to DataInserted using a Row > Main connection.
Link InsertToSalesforce to DataRejected using a Row > Reject connection.
Deselect the Extended Output and Die on error check boxes in the Advanced settings view of the tSalesforceOutput component so that the Reject link is available .
Configuring the data source
Double-click DataToInsert to open its Basic settings view in the Component tab.
In the Property Type drop-down list, select Built-In.
You can select Repository from the Property Type drop-down list to fill in the relevant fields automatically if the relevant metadata has been stored in the Repository. For more information about Metadata, see the Talend Studio User Guide.
In the File name/Stream field, type in the path of the source file, for example, E:/salesforceout.csv.
In the Header field, type in 1 to retrieve the column names. Keep the default settings for other fields.
Configuring the module for data insertion
Double-click InsertToSalesforce to open its Basic settings view in the Component tab.
In the Username field, enter your username, for example, email@example.com.
In the Password field, enter your password, for example, talendehmrEvHz2xZ8f2KlmTCymS0XU.
In the Action drop-down list, select insert.
In the Module drop-down list, select AdditionalNumber.
When linking the components earlier, the Extended Output and Die on error check boxes have been deselected in the Advanced settings view so that the Reject link can appear.
Keep the default settings for other fields.