Checking Multiple values
I have to solve the below business scenario :
The incoming row has to be checked with a pool of values , if conditions is satisfied then returns 1 else 0.Let see an example, if i have an employee id then that incoming employee id need to be checked among 1,2,3..till 50. If the incoming row equals any no. from 1 to 50, then it should return 1 else 0.
I think of a solution in which i can hardcode each value from 1 to 50 and compare it with the incoming row but i think this is not the optimized way of doing, so can you please suggest how to implement this?
-
Your business scenario can be achieved by using string contains( ) function. Below are the high level steps for achieving your scenario:
1) Create a global variable in the data mapping in which you have you have to provide the pool of values with which you want to compare the incoming source values.
2) Apply the textual rule in which use the contains ( ) function which will check whether the incoming value is contained in the values defined in global variable or not. The values will be returned as True or False.
But we recommend to use this only when you are concatenating a small set of values for larger and more values it is not recommended.
In that case you can store these values in file and can create a second source schema for that file and apply Key function on the basis of which you can transform the output value.
Refer below link for implementing Key Function:
http://support.adeptia.com/entries/21281176-Use-Key-function-to-group-source-Header-Details0
Post is closed for comments.
Comments
1 comment