Handling errors - 7.1

Talend Data Management Platform Studio User Guide

author
Talend Documentation Team
EnrichVersion
7.1
EnrichProdName
Talend Data Management Platform
task
Design and Development
EnrichPlatform
Talend Studio

About this task

The Die on error option prevents error to be processed. To do so, it stops the Job execution as soon as an error is encountered. The tMap component provides this option to prevent processing erroneous data. The Die on error option is activated by default in tMap.

Deactivating the Die on error option will allow you to skip the rows on error and complete the process for error-free rows on one hand, and to retrieve the rows on error and manage them if needed.

To deactivate the Die on error option:

Procedure

  1. Double-click the tMap component on the design workspace to open the Map Editor.
  2. Click the Property Settings button at the top of the input area to display the Property Settings dialog box.
  3. In Property Settings dialog box, clear the Die on error check box and click OK.

Results

A new table called ErrorReject appears in the output area of the Map Editor. This output table automatically comprises two columns: errorMessage and errorStackTrace, retrieving the message and stack trace of the error encountered during the Job execution. Errors can be unparseable dates, null pointer exceptions, conversion issues, etc.

You can also drag and drop columns from the input tables to this error reject output table. Those erroneous data can be retrieved with the corresponding error messages and thus be corrected afterward.

Once the error reject table is set, its corresponding flow can be sent to an output component.

To do so, on the design workspace, right-click the tMap component, select Row > ErrorReject in the menu, and click the corresponding output component, here tLogRow.

When you execute the Job, errors are retrieved by the ErrorReject flow.

The result contains the error message, its stack trace, and the two columns, id and date, dragged and dropped to the ErrorReject table, separated by a pipe "|".