The Integration Service expands the mapping parameters and variables in an expression after it parses the expression. If you have an expression that changes frequently, you can define the expression string in a parameter file so that you do not have to update the mappings that use the expression when the expression changes.
To define an expression string in a parameter file, you create a mapping parameter or variable to store the expression string, and set the parameter or variable to the expression string in the parameter file. The parameter or variable you create must have IsExprVar set to true. When IsExprVar is true, the Integration Service expands the parameter or variable before it parses the expression.
For example, to define the expression
IIF(color=‘red’,5)
in a parameter file, perform the following steps:
In the mapping that uses the expression, create a mapping parameter $$Exp. Set IsExprVar to true and set the datatype to String.
In the Expression Editor, set the expression to the name of the mapping parameter as follows:
$$Exp
Configure the session or workflow to use a parameter file.
In the parameter file, set the value of $$Exp to the expression string as follows: