• Font Size
  • S
  • M
  • L

Search via FAQ No.


  • No : 30655
  • Open Date : 2019/09/02 12:03
  • Print
NEW

[DataSpider Servista] Specifications regarding a value substitution against script variables in Mapper

I substituted the value converted by the logic obtained from script variables in Mapper, to the input source of script variables and to different script variables. When I checked the result, even though I substituted value from the same logic, another script variable was substituted with a value that was converted multiple times by the logic. Is this behaving accordingly to the specification?
 
Example:
  • In the case of numerical values
Script variable 1 (Value: 0)
Logic change: add 1 to the input value
→ Script variable 1 (Value: 1)
→ Script variable 2 (Value: 2)
  • In the case of character strings
Script variable 1 (Value: A)
Logic change: Add an A to the end of the input value
→ Script variable 1 (Value: AA)
→ Script variable 2 (Value: AAA)
  • In the case of dates
Script variable 1 (Value: 2016)
Logic change: add 1 year to the input value
→ Script variable 1 (Value: 2017)
→ Script variable 2 (Value: 2018)
 
Category : 

Answer

Specification
 
In Mapper, the substitution of values against script variables is executed in the order decided internally.
 
Therefore, there are "script variable 1" and "script variable 2" and the value acquired from "script variable 1" is converted by the logic and if it is set to substitute into both "script variable 1" and "script variable 2", the process will be performed in the following order:
  1. Converts the value acquired from "script variable 1" by the logic and substitutes it to "script variable 1"
  2. Converts the value acquired from “script variable 1” (converted in * 1) by the logic and substitutes it to “script variable 2”
Therefore, "script variable 2" is substituted with the value that has been converted twice.
 
Workaround
 
If you want to substitute the original script variable and another script variable after the value acquired from the script variable is converted using the logic, set to use a different Mapper for each substitution: a substitution to the original script variable and substitution to another script variable.
 
If it applies to the case of the example of “In case of numerical value,” set the process of adding 1 to the script variable 1 value and the process of substituting to the script variable 2 results to a different Mapper to each