Page 1 of 1

NULL value in DECIMAL fields

Posted: Thu Jun 26, 2008 1:27 am
by verify
Hi,

We have 5 sequential files getting joined using Left outer join. Only the master record has the data and no child record is having data. But when the data is coming out from the JOIN stage is displaying 0 values into the decimal fileds that are coming from the child records. Where as our requirement is to display NULL value in the decimal field if there is no i/p data.
For this we tried using Nullable property for the respective decimal columns as YES. In this case the value is being displayed as NULL for the decimal fields those are having precision as > 0 but the job is being aborted with the following error message for the decimal fields those are not having any precision.

"Value larger than specified precision"

But the length of the field is defined properly through out all the stages including Oracle stage as per the defined structure of Oracle table.

Can anybody please help me out to solve this issue.

Thanks.

Re: NULL value in DECIMAL fields

Posted: Thu Jun 26, 2008 4:05 am
by venki
Generally this type of warnings gives when incoming field length is larger than the outgoing field length.
some where small missmatch occured between incoming field length and out going field lengh.
Check once more.
Regards,
Venkat.

Re: NULL value in DECIMAL fields

Posted: Thu Jun 26, 2008 10:26 am
by datastagedw
verify wrote:Hi,

We have 5 sequential files getting joined using Left outer join. Only the master record has the data and no child record is having data. But when the data is coming out from the JOIN stage is displaying 0 values into the decimal fileds that are coming from the child records. Where as our requirement is to display NULL value in the decimal field if there is no i/p data.
For this we tried using Nullable property for the respective decimal columns as YES. In this case the value is being displayed as NULL for the decimal fields those are having precision as > 0 but the job is being aborted with the following error message for the decimal fields those are not having any precision.

"Value larger than specified precision"

But the length of the field is defined properly through out all the stages including Oracle stage as per the defined structure of Oracle table.

Can anybody please help me out to solve this issue.

Thanks.


hi there,

can u please let us know the nullability of the target columns you are loading the decimal fields to?

Posted: Thu Jun 26, 2008 4:51 pm
by ray.wurlod
U has not logged in for some time.

The second person personal pronoun in English is spelled "you".

Posted: Fri Jun 27, 2008 7:29 am
by verify
Hi,

The target database field is NULLABLE only. Also the length of input field and output fields are same.

What should we do if the join stage is giving NULL for the decimal columns and when the same value is being loaded into the Oracle it is populating with 0 where as when I use target as sequential file instead Oracle stage it is populating as NULL.

Is this a bug in the 8.0.1 version?

Thanks

Posted: Fri Jun 27, 2008 4:18 pm
by ray.wurlod
Data types are not enforced in sequential files. Therefore, although you might have a field defined as Decimal[5,0], there's nothing to prevent it containing eight digits. You still need to check your data - create a job to read the file and to report the length of the field that is generating the error message.

Posted: Thu Jul 03, 2008 3:22 am
by DSRajesh
Why dont you try with modify stage HANDLE_NULL() between join and Oracle?