Function Reference > Functions > SETCOUNTVARIABLE
  

SETCOUNTVARIABLE

Counts the rows evaluated by the function and increments the current value of an in-out parameter based on the count. Returns the new current value.
At the end of each task session, Data Integration saves the last current value in the job details. Unless overridden, Data Integration uses the saved value as the initial value of the variable for the next time you use the task.
Use the SETCOUNTVARIABLE function only once for each in-out parameter in a pipeline. Data Integration processes variable functions as it encounters them in the mapping. The order in which Data Integration encounters variable functions in the mapping might not be the same for every session run. This could cause inconsistent results when you use the same variable function multiple times in a mapping.
You can use SETCOUNTVARIABLE in an Expression transformation.

Syntax

SETCOUNTVARIABLE( $$Variable )
Argument
Required/
Optional
Description
$$Variable
Required
Name of the in-out parameter that you want to set.

Return Value

The current value of the in-out parameter.