Null value on the accessor interfacing to field

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

Post Reply
partha.natta
Premium Member
Premium Member
Posts: 32
Joined: Tue Mar 09, 2010 5:56 am
Location: Bangalore

Null value on the accessor interfacing to field

Post by partha.natta »

Hi,

I am using the below logic in transformer as filter condition and getting the error message as "Fatal Error: Null value on the accessor interfacing to field "TrxnTyp".


(IsNotNull(DSLink110.TrxnTyp) and IsNotNull(DSLink110.TrxnTypDtl) and
(TRIM(DSLink110.TrxnTyp)=5 and TRIM(DSLink110.TrxnTypDtl)=4)) Or
(IsNotNull(DSLink110.TrxnTyp_2) and IsNotNull(DSLink110.TrxnTypDtl_2) and
(TRIM(DSLink110.TrxnTyp_2)=5 and TRIM(DSLink110.TrxnTypDtl_2)=4)) Or
(IsNotNull(DSLink110.TrxnTyp_3) and IsNotNull(DSLink110.TrxnTypDtl_3) and
(TRIM(DSLink110.TrxnTyp_3)=5 and TRIM(DSLink110.TrxnTypDtl_3)=4)) Or
(IsNotNull(DSLink110.TrxnTyp_4) and IsNotNull(DSLink110.TrxnTypDtl_4) and
(TRIM(DSLink110.TrxnTyp_4)=5 and TRIM(DSLink110.TrxnTypDtl_4)=4)) Or
(IsNotNull(DSLink110.TrxnTyp_5) and IsNotNull(DSLink110.TrxnTypDtl_5) and
(TRIM(DSLink110.TrxnTyp_5)=5 and TRIM(DSLink110.TrxnTypDtl_5)=4)) Or
(IsNotNull(DSLink110.TrxnTyp_6) and IsNotNull(DSLink110.TrxnTypDtl_6) and
(TRIM(DSLink110.TrxnTyp_6)=5 and TRIM(DSLink110.TrxnTypDtl_6)=4)) Or
(IsNotNull(DSLink110.TrxnTyp_7) and IsNotNull(DSLink110.TrxnTypDtl_7) and
(TRIM(DSLink110.TrxnTyp_7)=5 and TRIM(DSLink110.TrxnTypDtl_7)=4)) Or
(IsNotNull(DSLink110.TrxnTyp_8) and IsNotNull(DSLink110.TrxnTypDtl_8) and
(TRIM(DSLink110.TrxnTyp_8)=5 and TRIM(DSLink110.TrxnTypDtl_8)=4)) Or
(IsNotNull(DSLink110.TrxnTyp_9) and IsNotNull(DSLink110.TrxnTypDtl_9) and
(TRIM(DSLink110.TrxnTyp_9)=5 and TRIM(DSLink110.TrxnTypDtl_9)=4))

Could you please let me know the issue.
Thanks & Regards,
Partha
pkll
Participant
Posts: 73
Joined: Thu Oct 25, 2012 9:45 pm

Re: Null value on the accessor interfacing to field

Post by pkll »

you have NULL value in TrxnTyp field...
partha.natta
Premium Member
Premium Member
Posts: 32
Joined: Tue Mar 09, 2010 5:56 am
Location: Bangalore

Re: Null value on the accessor interfacing to field

Post by partha.natta »

Ya I know there are some null values are there, that is why I am using IsNotNull(TrxnTyp) in the condition.
Thanks & Regards,
Partha
partha.natta
Premium Member
Premium Member
Posts: 32
Joined: Tue Mar 09, 2010 5:56 am
Location: Bangalore

Post by partha.natta »

Even I have tried with this logic as well but the same error I am getting again.


(TRIM(NulltoValue(DSLink110.TrxnTyp,''))=5 and TRIM(NulltoValue(DSLink110.TrxnTypDtl,''))=4) Or
(TRIM(NulltoValue(DSLink110.TrxnTyp_2,''))=5 and TRIM(NulltoValue(DSLink110.TrxnTypDtl_2,''))=4) Or
(TRIM(NulltoValue(DSLink110.TrxnTyp_3,''))=5 and TRIM(NulltoValue(DSLink110.TrxnTypDtl_3,''))=4) Or
(TRIM(NulltoValue(DSLink110.TrxnTyp_4,''))=5 and TRIM(NulltoValue(DSLink110.TrxnTypDtl_4,''))=4) Or
(TRIM(NulltoValue(DSLink110.TrxnTyp_5,''))=5 and TRIM(NulltoValue(DSLink110.TrxnTypDtl_5,''))=4) Or
(TRIM(NulltoValue(DSLink110.TrxnTyp_6,''))=5 and TRIM(NulltoValue(DSLink110.TrxnTypDtl_6,''))=4) Or
(TRIM(NulltoValue(DSLink110.TrxnTyp_7,''))=5 and TRIM(NulltoValue(DSLink110.TrxnTypDtl_7,''))=4) Or
(TRIM(NulltoValue(DSLink110.TrxnTyp_8,''))=5 and TRIM(NulltoValue(DSLink110.TrxnTypDtl_8,''))=4) Or
(TRIM(NulltoValue(DSLink110.TrxnTyp_9,''))=5 and TRIM(NulltoValue(DSLink110.TrxnTypDtl_9,''))=4)
Thanks & Regards,
Partha
pkll
Participant
Posts: 73
Joined: Thu Oct 25, 2012 9:45 pm

Post by pkll »

If IsNotNull(DSLink110.TrxnTyp) Then DSLink110.TrxnTyp Else "NULL"

check this condition.
partha.natta
Premium Member
Premium Member
Posts: 32
Joined: Tue Mar 09, 2010 5:56 am
Location: Bangalore

Post by partha.natta »

I need to use it for filtering the incoming records and that is why I am using in the transformer constraint.
Thanks & Regards,
Partha
ssnegi
Participant
Posts: 138
Joined: Thu Nov 15, 2007 4:17 am
Location: Sydney, Australia

Post by ssnegi »

make the field with null value nullable Yes in the column metadata definition.
dsetlteam
Premium Member
Premium Member
Posts: 35
Joined: Mon Feb 10, 2014 10:14 pm
Location: USA

Post by dsetlteam »

If there are NULL values in the source column and if it is being TRIM'ed - it throws an error. Try removing the TRIM function and check once.
Post Reply