Passing and Calulating Expression Dynamically
Posted: Wed Sep 13, 2017 7:14 am
I'm getting following value of derivation in column flag_value from a table
if ((currentMonth <= 3 and ( ((mbrSubPlnAdjEndDt ="") or ((mbrEnrEndDtMonth >= 1) and (mbrEnrEndDtYear >= (currentYear - 1)))))) or (currentMonth > 3 and ( ((mbrSubPlnAdjEndDt ="") or ((mbrEnrEndDtMonth >= 7) and (mbrEnrEndDtYear >= currentYear)))))) then 'A' else 'I'
I'm calculating stage variables CurrentMonth, mbrSubPlnAdjEndDt and others in Stage Variable and above derivation I'm getting in other source column. This derivation is different for different Clients so it is going to be dynamically set. Here problem is when I'm passing this derivation in output column flag_value in derivation in transformer, it is taking it as text and not from stage variables calculated and not doing calculation of if/else. Could anyone please help how can we make transformer to take it as expression instead of text and do calculation for each record?
if ((currentMonth <= 3 and ( ((mbrSubPlnAdjEndDt ="") or ((mbrEnrEndDtMonth >= 1) and (mbrEnrEndDtYear >= (currentYear - 1)))))) or (currentMonth > 3 and ( ((mbrSubPlnAdjEndDt ="") or ((mbrEnrEndDtMonth >= 7) and (mbrEnrEndDtYear >= currentYear)))))) then 'A' else 'I'
I'm calculating stage variables CurrentMonth, mbrSubPlnAdjEndDt and others in Stage Variable and above derivation I'm getting in other source column. This derivation is different for different Clients so it is going to be dynamically set. Here problem is when I'm passing this derivation in output column flag_value in derivation in transformer, it is taking it as text and not from stage variables calculated and not doing calculation of if/else. Could anyone please help how can we make transformer to take it as expression instead of text and do calculation for each record?