Question
In a Mapper, I converted a value taken from a script variable by a logic and assigned it to the original script variable and another script variable.
As a result, the another script variable was assigned a value that was converted twice by the logic.
Is this an expected behavior?
-Examples
In the case of a numerical value:
Script variable 1 (Value: 0)
Add 1 to the input value.
-> Script variable 1 (Value: 1)
->Script variable 2 (Value: 2)
In the case of a character string:
Script variable 1 (Value: A)
Append "A" to the end of the input value.
-> Script variable 1 (Value: AA)
-> Script variable 2 (Value: AAA)
Script variable 1 (Value : 2016)
Add 1 year to the input value.
-> Script variable 1 (Value : 2017)
-> Script variable 2 (Value : 2018)
Answer
-Specification
Mapper executes the assignment of values to script variables based on internally determined order.
Therefore, when converting a value taken from Script Variable 1 by a logic and assigned it to Script Variable 1 and Script Variable 2, the processing is as follows:
1. Assign the value to Script Variable 1.
2. The value obtained from Script Variable 1 is converted again by the logic and assigned it to Script Variable 2.
-Workaround
If you would like to convert a value taken from Script Variable 1 by a logic and assigned the same value to Script Variable 1 and Script Variable 2, please execute each assignment with different Mappers.
In the case of the numerical value in the above example, please assign the added value "1" to Script Variable 1 in a Mapper and assign the result to Script Variable 2 in another Mapper.
Comments
0 comments
Article is closed for comments.