Record Dropped

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

rsunny
Participant
Posts: 223
Joined: Sat Jul 03, 2010 10:22 pm

Record Dropped

Post 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
soumya5891
Participant
Posts: 152
Joined: Mon Mar 07, 2011 6:16 am

Re: Record Dropped

Post by soumya5891 »

Is the field on which you are checking null is varchar ?
Soumya
rsunny
Participant
Posts: 223
Joined: Sat Jul 03, 2010 10:22 pm

Re: Record Dropped

Post by rsunny »

soumya5891 wrote:Is the field on which you are checking null is varchar ?
Yes. I checked with Datatype "Double" also.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Disable operator combination to learn where the error is actually occurring.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rsunny
Participant
Posts: 223
Joined: Sat Jul 03, 2010 10:22 pm

Post 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
Ravi.K
Participant
Posts: 209
Joined: Sat Nov 20, 2010 11:33 pm
Location: Bangalore

Post by Ravi.K »

Display for us how you are handled Null.
Cheers
Ravi K
rsunny
Participant
Posts: 223
Joined: Sat Jul 03, 2010 10:22 pm

Post 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
Ravi.K
Participant
Posts: 209
Joined: Sat Nov 20, 2010 11:33 pm
Location: Bangalore

Post 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'.
Cheers
Ravi K
rsunny
Participant
Posts: 223
Joined: Sat Jul 03, 2010 10:22 pm

Post 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.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post 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,
- james wiles


All generalizations are false, including this one - Mark Twain.
prakashdasika
Premium Member
Premium Member
Posts: 72
Joined: Mon Jul 06, 2009 9:34 pm
Location: Sydney

Post by prakashdasika »

Try this:

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

This should work.
Prakash Dasika
ETL Consultant
Sydney
Australia
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

... which is exactly the same as NullToValue(DSLink18.copysno,1)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
baglasumit21
Participant
Posts: 132
Joined: Wed Mar 01, 2006 11:12 pm
Location: Pune

Post by baglasumit21 »

Can you try using trim as below:

IF ISNULL(DSLink18.copysno) or trim(DSLink18.copysno)='' then '1' else DSLink18.copysno
SMB
suse_dk
Participant
Posts: 93
Joined: Thu Aug 11, 2011 6:18 am
Location: Denmark

Re: Record Dropped

Post 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?
_________________
- Susanne
Post Reply