handle_null() to replace one column with another when NULL
Posted: Wed Feb 13, 2013 1:43 am
Hi
There is a simple derivation where a source date column which is Nullable is to be replaced with NOT NULL date column when the source column is NULL.
Tried the below:
before trying with dates I tested for varchar columns, KEY2 is the source column and KEY1 is the NOT NULL column but it looks like handle_null function takes only scalar values and is not picking up the actual value in the column KEY1
Result when all KEY2 are NULL
abc,KEY1
abc,KEY1
abc,KEY1
And I dont want to use a transformer with If then else clause for such simple thing. Any ideas
Thanks
There is a simple derivation where a source date column which is Nullable is to be replaced with NOT NULL date column when the source column is NULL.
Tried the below:
Code: Select all
TST=handle_null(KEY2,KEY1)
Result when all KEY2 are NULL
abc,KEY1
abc,KEY1
abc,KEY1
And I dont want to use a transformer with If then else clause for such simple thing. Any ideas
Thanks