Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to do an IN condition in tMap expression i.e. check if the value of a column falls in a list of values.
e.g. my input row contains a column STATE and i want to allow data belonging to only certain states, let's say CA, NY and NC, to flow downstream as ouput from tMap.
I know i can do something like this in tMap expression filter
row1.STATE =="CA" || row1.STATE =="NY" || row1.STATE =="NC" .
I actually do not want to hardcode my list in the expression, but, instead pass them as a context variable. Also, my list of values is not constant; it can go up or down.
So, i was wondering if there is something like
row1.STATE in (context.desired_states) that i can do where i can set the value of context variable desired_states as "NY","CA",'WA" . This gives flexibility to change the list by just updating the context variable value instead of chaging the code everytime i want to add or remove a value from the list.