Handling errors

In the previous example, we knew that the injury didn't exist in the destination table, but that is not the only possible error when trying to update a table. Let's refine our transformation a bit, as follows:

  1. Right-click on the Update step and select Error Handling....
  2. In the window that shows up, look for the Error descriptions fieldname textbox, and fill it in with the text error_description.
  3. Close the window.
  4. Run the transformation again. This time, no row is updated, as we already updated the comment the first time we ran the transformation.
  5. If you look at the Logging window, you will see the details of the rejected row, including a new field with the description of the error that caused the rejection:
 ... - rejected ...

Get Pentaho Data Integration Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.