Search code examples
informatica-powercenter

Informatica SET Mapping variable


I'm new to informatica. I defined a mapping variable in the 'parameters and variables' option in a mapping.

Now in an expression, I need to update the value of the mapping variable depending on the value of the records and also refer to its value at the same time.

Basically, why can't I set the value of a mapping variable in an expression in real time? When I do use SETVARIABLE($$VAR,value), the value gets reflected only after the session ends and not during the session..


Solution

  • If you want a variable that holds its value between rows or other ports within the same row, use a Variable port within your Expression transformation instead (tick the box in the 'V' column for a new port). Mapping parameters/variables are meant more for higher-level values passed in at runtime for things like connection names, conditions etc.

    The value set per row is "remembered" for the next row processed by the Integration Service, and also holds its value for any subsequent ports, i.e. port ordering is improtant for the evaluation order.