Page 1 of 1

Transformer Logic?

Posted: Tue Aug 05, 2014 10:06 am
by pkll
Hi All,

I have some records in EFF_DATE column.

In this i have some NULL values and '0001-01-01' and '1559-01-01' records and i have some after 1990's records.

if date > 1800 i need to pass same input date value. if date is NULL value i need to pass Null value only.when date is '0001-01-01' and '1559-01-01' i need to pass hard code value('1799-01-01')


I tried as below

if trim((YearFromDate(input.EFF_DATE)))='' then '1600' else (YearFromDate(input.EFF_DATE))------STG1

If STG > '1800' Then input.EFF_DATE else '1799-01-01'----------STG2

In this NULL value is also converting '1799-01-01'.

But when NULL values are coming i need to populate NULL values only.


Could you please help me the above?

Thanks For Advance help!!!!

Posted: Tue Aug 05, 2014 10:10 am
by chulett
Then check for NULL explicitly and handle it explicitly in addition to your other checks / transforms.

Posted: Tue Aug 05, 2014 10:30 am
by yugee
replace your below condition:

If input.EFF_DATE='' OR IsNull(input.EFF_DATE) Then
input.EFF_DATE
Else
If STG > '1800' Then input.EFF_DATE else '1799-01-01'----------STG2

Posted: Tue Aug 05, 2014 10:55 am
by chulett
Or explicitly pass NULL for those first two conditions.