Page 1 of 2

Record Dropped

Posted: Sat Sep 03, 2011 11:21 am
by rsunny
Hi,

I am having a small job where i am having Null values which is passed through Transformer and then to Sequential file.I have handled Null values in the stage variables in transformer like IsNUll(Column),NullTOValue(),NullTOZero(),Column='', but still getting the below error.

"APT_CombinedOperatorController(2),0: Field 'copysno' from input dataset '0' is NULL. Record dropped."

The problem is in the transformer as i have handled Null values for Sequential file.

Can any please provide me the solution for this issue.

Thanks in Advance

Re: Record Dropped

Posted: Sat Sep 03, 2011 1:09 pm
by soumya5891
Is the field on which you are checking null is varchar ?

Re: Record Dropped

Posted: Sat Sep 03, 2011 2:13 pm
by rsunny
soumya5891 wrote:Is the field on which you are checking null is varchar ?
Yes. I checked with Datatype "Double" also.

Posted: Sat Sep 03, 2011 5:28 pm
by ray.wurlod
Disable operator combination to learn where the error is actually occurring.

Posted: Sun Sep 04, 2011 12:25 am
by rsunny
I disabled operator combination.I got the below error.

Transformer_40,0: Field 'sourcerow' from input dataset '0' is NULL. Record dropped.

I am getting the error in the transformer , but i tried using Null handling functions but still getting the error.

Any help is really appreciated.

Thanks in advance

Posted: Sun Sep 04, 2011 3:54 am
by Ravi.K
Display for us how you are handled Null.

Posted: Sun Sep 04, 2011 6:09 am
by rsunny
Ravi.K wrote:Display for us how you are handled Null.

IF ISNULL(DSLink18.copysno) THEN NULLTOVALUE(DSLink18.copysno,1) ELSE DSLink18.copysno or if DSLink18.copysno='' then '1' else DSLink18.copysno

Posted: Sun Sep 04, 2011 11:53 am
by Ravi.K
Try with below revised derivation.

If (ISNULL(DSLink18.copysno) Or DSLink18.copysno='') Then 1 Else DSLink18.copysno


and also Confirms the provided derivation is belongs to Transformer_40,0: Field 'sourcerow'.

Posted: Sat Sep 10, 2011 12:09 pm
by rsunny
I have provided the condition If (ISNULL(DSLink18.sourcerow) Or DSLink18.sourcerow='') Then 1 Else DSLink18.sourcerow
but still getting the below error


Transformer_40,0: Field 'sourcerow' from input dataset '0' is NULL. Record dropped.

Posted: Sat Sep 10, 2011 12:43 pm
by jwiles
The IsNull() needs to be in a separate if-then-else clause. All conditions in an if statement are checked, IIRC beginning with DS 7.5.

If isnull() then ... else if '' then ... else ...

Regards,

Posted: Sun Sep 11, 2011 8:29 pm
by prakashdasika
Try this:

If NullToEmpty(DSLink18.copysno)='' Then 1 Else DSLink18.copysno

This should work.

Posted: Sun Sep 11, 2011 10:26 pm
by ray.wurlod
... which is exactly the same as NullToValue(DSLink18.copysno,1)

Posted: Tue Sep 13, 2011 2:43 am
by priyadarshikunal
ray.wurlod wrote:... which is exactly the same as NullToValue(DSLink18.copysno,1)
Exactly same when there is no empty characters coming from input link. In this case it will leave the empty character as it is and replace nulls with 1.

Posted: Tue Sep 13, 2011 4:35 am
by baglasumit21
Can you try using trim as below:

IF ISNULL(DSLink18.copysno) or trim(DSLink18.copysno)='' then '1' else DSLink18.copysno

Re: Record Dropped

Posted: Tue Sep 13, 2011 5:37 am
by suse_dk
You write you are performing your null handling in a stage variable - so do you make sure to either use the result in a constraint on the output link or as input to your derivation?