Page 1 of 1

Introducing New column in the Transformer Stage

Posted: Thu Sep 23, 2004 2:24 am
by Madhav_M
Hi
In the transformer stage I introduced one new column(TMMBR_F) which has a derivation like if TMMBR_ADJ_A > 0 then 'Y' else 'N'.
In the input link to Transformer stage I am getting 100 rows in the output link from TRNS stage I am only getting 10 rows why is that..

Please throw some lights on this.

Thanks
Madhav.

Posted: Thu Sep 23, 2004 2:27 am
by Madhav_M
FYI I am getting this info while running the job..
TRNS_SetTMMBR_F2,0: Field 'TMMBR_ADJ_A' from input dataset '0' is NULL. Record dropped.
Field 'TMMBR_ADJ_A' from input dataset '0' is NULL. Record dropped

Posted: Thu Sep 23, 2004 3:05 am
by richdhan
Hi Madhav,

You have to handle null values for 'TMMBR_ADJ_A'.

You can use nulltovalue or use the if then else loop to check if the value is null or the value > 0 and provide appropriate values. Beacuse of nullablity 90 rows have been dropped from the input dataset.

HTH
--Rich

Pride comes before a fall
Humility comes before honour

Posted: Thu Sep 23, 2004 3:40 pm
by ray.wurlod
Do you have any output constraints on that link?

Otherwise, richdhan's advice about null values seems apposite.

Posted: Tue Sep 28, 2004 1:39 pm
by gh_amitava
Hi,

You can use this

If IsNull(TMMBR_ADJ_A) = 1 Then <Some default value or Space(<Field Length>) Else If TMMBR_ADJ_A > 0 then 'Y' else 'N'.

Regards
~Amitava

Posted: Wed Sep 29, 2004 7:28 am
by dsxdev
Hi,
When ever you are using a function on an input column which is nullable,
it is better you handle nulls explicitly. Otherwise the records would be dropped when ever a null is encountered in that field.

As rightly pointed in above mails you can use IsNull or NullToValue functions to trap nulls.There are some morw functions available in the Transfomer Editor for null handling. You can use any of them as per your need.

Even IsNotNull would also help.