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 ...