Setting variables with partial or total results of your flow

There is still another common situation in which you may want to set variables—at the end of a flow in a Transformation. These are some examples:

  • Setting a variable with OK or ERROR values depending on the flow where the rows go
  • Setting a variable with the total number of rows inserted in a table
  • Setting a variable with the total number of valid rows coming from a file

To set these variables, you use the Set Variables step in the same way. The only thing that you have to take into account is that the Set Variables step may receive only one row. So, before linking any flow with this step, you have to add the proper PDI steps in order to keep just one row. You may use a Group by ...

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.