Controlling the flow using predefined constants

JavaScript has a way of controlling the flow of data, that is, deciding which rows follow the normal flow and which ones are discarded. It acts as a filter. To control the flow, you play with a special variable named trans_Status. This variable is evaluated for each row in your dataset and depending on the value, the result is different, as shown in the following table:

If the trans_Status value is set to ...

The current row ...

SKIP_TRANSFORMATION

is removed from the dataset.

CONTINUE_TRANSFORMATION

is kept. Nothing happens to it.

ERROR_TRANSFORMATION

causes the abortion of the Transformation.

The way you set the values is as simple as the following:

trans_Status ...

Get Learning Pentaho Data Integration 8 CE - Third Edition 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.