Records Drop Due to NULL

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
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Records Drop Due to NULL

Post by G SHIVARANJANI »

Hi,


I am loading a table with a data coming from csv file,

It has null values in it,

the column which has null is being used in stage variable and constraints,

if not used in constraints, and stage variable then it never drops the records...if used it does so.

i have used isnull to check if the column is null or not..if its null i am rejecting the record (in stage variable and constraints)

Please suggest ,

thanku
Shivaranjani
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Re: Records Drop Due to NULL

Post by G SHIVARANJANI »

and these columns are nullable columns.
Shivaranjani
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

It would be easy for us to solve your problem if you can post your derivation.
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Post by G SHIVARANJANI »

Here is the derivation for value column:


before:if NUM(Trim((INP_1.Value))) = 1 or trim((INP_1.Value)) = ''
Then 0
else 1
AND

Now:
if NUM(Trim(NULLTOEMPTY(INP_1.Value))) = 1 or trim(NULLTOEMPTY(INP_1.Value)) = ''
Then 0
else 1


The records are not getting dropped but still the warning is there
saying
"APT_CombinedOperatorController,0: Null string argument."
Shivaranjani
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Post by G SHIVARANJANI »

Please suggest how to remove this warning;
G SHIVARANJANI wrote:Here is the derivation for value column:


before:if NUM(Trim((INP_1.Value))) = 1 or trim((INP_1.Value)) = ''
Then 0
else 1
AND

Now:
if NUM(Trim(NULLTOEMPTY(INP_1.Value))) = 1 or trim(NULLTOEMPTY(INP_1.Value)) = ''
Then 0
else 1


The records are not getting dropped but still the warning is there
saying
"APT_CombinedOperatorController,0: Null string argument."
Shivaranjani
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 isolate the stage that is generating the error.
Try using casing as per the manual for the function names, for example NullToEmpty().
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shivadas
Participant
Posts: 48
Joined: Tue Jun 12, 2007 12:10 am

Handling Null values

Post by shivadas »

ray.wurlod wrote:Disable operator combination to isolate the stage that is generating the error.
Try using casing as per the manual for the function names, for example NullToEmpty(). ...

while reading csv file you have a option Nullabe =yes/No

try that option
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Re: Handling Null values

Post by G SHIVARANJANI »

Hi,

As the warning still persists,

the job is aborting if the number of warnings is greater than 50

Please suggest how can i remove this warning.
Shivaranjani
nsm
Premium Member
Premium Member
Posts: 139
Joined: Mon Feb 09, 2004 8:58 am

Post by nsm »

Hi you can have a message handler defined to filter the warning from log if any of the specified methods didn't work.
nsm
Premium Member
Premium Member
Posts: 139
Joined: Mon Feb 09, 2004 8:58 am

Post by nsm »

Hi you can have a message handler defined to filter the warning from log if any of the specified methods didn't work.
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Post by G SHIVARANJANI »

Actually i have put up a check for a field comming from source which is nullable:
The transformer uses stagevariable as

If NUM((NullToEmpty(INP_1.Value))) = 1 or NullToEmpty(INP_1.Value) = '' then 0 else 1

if this not used it do not give any warning if used it gives warning;

and the source value INP_1.Value has null values in it

thanku
nsm wrote:Hi you can have a message handler defined to filter the warning from log if any of the specified methods didn't work.
Shivaranjani
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Post by G SHIVARANJANI »

Hi,

Please let me know how to disable "operator combination"

thanku.
Shivaranjani
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

Hi Shivaranjani,

Try this may be it solves ur problem:

If IsNull(INP_1.Value) Then ""else(If Trim(INP_1.Value) =1 0r Trim(INP_1.Value) ='' then 0 else 1)


Cheers,
Thanx&Regards
scorpion
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Post by G SHIVARANJANI »

Hi Scorpion,

Thanks a lot its working now....

scorpion wrote:Hi Shivaranjani,

Try this may be it solves ur problem:

If IsNull(INP_1.Value) Then ""else(If Trim(INP_1.Value) =1 0r Trim(INP_1.Value) ='' then 0 else 1)


Cheers,
Shivaranjani
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Time to mark the thread as Resolved, then.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply