Page 1 of 1

Records Drop Due to NULL

Posted: Thu Jul 26, 2007 7:29 am
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

Re: Records Drop Due to NULL

Posted: Thu Jul 26, 2007 7:31 am
by G SHIVARANJANI
and these columns are nullable columns.

Posted: Thu Jul 26, 2007 7:52 am
by balajisr
It would be easy for us to solve your problem if you can post your derivation.

Posted: Thu Jul 26, 2007 8:40 am
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."

Posted: Thu Jul 26, 2007 10:53 am
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."

Posted: Thu Jul 26, 2007 2:10 pm
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().

Handling Null values

Posted: Fri Jul 27, 2007 3:49 am
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

Re: Handling Null values

Posted: Mon Jul 30, 2007 7:58 am
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.

Posted: Mon Jul 30, 2007 8:54 am
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.

Posted: Mon Jul 30, 2007 8:54 am
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.

Posted: Mon Jul 30, 2007 9:05 am
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.

Posted: Mon Jul 30, 2007 9:33 am
by G SHIVARANJANI
Hi,

Please let me know how to disable "operator combination"

thanku.

Posted: Mon Jul 30, 2007 9:44 am
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,

Posted: Mon Jul 30, 2007 10:07 am
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,

Posted: Mon Jul 30, 2007 3:57 pm
by ray.wurlod
Time to mark the thread as Resolved, then.