Page 1 of 1

Decimal

Posted: Thu Nov 13, 2008 10:53 am
by pradeep_nov18
Hi Experts,

Source column is datatype is decimal(15,12) and o/p column datatype is decimal(12,2).


APT_CombinedOperatorController(1),0: APT_Decimal::ErrorBase: From: the source decimal has even precision, but non-zero in the leading nybble, or is too large for the destination decimal..Record dropped.

Can anyone help me on this?thanks in advance for your reply!

Posted: Thu Nov 13, 2008 12:58 pm
by ray.wurlod
Please disable operator combination and report the complete error message after running again.

Posted: Mon Nov 17, 2008 11:37 am
by pradeep_nov18
Hi ray,

i have turned the combinability mode to 'Don't Combine' still it is generating same warning dropping record

PURCH_TRANSTN_COND_Xform,0: APT_Decimal::ErrorBase: From: the source decimal has even precision, but non-zero in the leading nybble, or is too large for the destination decimal..Record dropped.

suggest how to remove these warning.

Thanks in Advance!!!

Posted: Mon Nov 17, 2008 12:40 pm
by Mike
But now you know which operator is generating the message...

PURCH_TRANSTN_COND_Xform (transformer?). Add a reject link to capture the records that are being dropped so you know which decimal values are not being converted.

I suspect you may need to do an explicit DecimalToDecimal type conversion.

Mike

Posted: Mon Nov 17, 2008 1:28 pm
by pradeep_nov18
Hi Mike,

Thanks for the reply,

Even i tried that,I checked the otherwise option in transformer but all the record are propogating in both the output.

In my requirement my source is string and i need to multiply with decimal for the string field of datatype decimal(15,12) and i have converted that string field to decimal and multiplied with decimal field.so iam getting this warning with droping records and loading few records and the o/p is decimal(12,2)

Thanks in advance for your reply!

Posted: Mon Nov 17, 2008 1:41 pm
by Mike
Make sure your otherwise link is last in the link ordering.

You originally said your source field was decimal(15,12). Now you're saying it is a string. :?

Please post your derivation and include the exact data types of each source field (or stage variable).

Mike

Posted: Mon Nov 17, 2008 1:50 pm
by pradeep_nov18
1.sTAGE vARIABLE :if IsNull(PURCH_TRANSTN_COND_Cpy1_ln.CURNCY_MULTIPLY_FCTR_VAL) Then 1 else PURCH_TRANSTN_COND_Cpy1_ln.CURNCY_MULTIPLY_FCTR_VAL
THIS COLUMN IS TAKEN FROM SOME OTHER TABLE OF DATA TYPE CURNCY_MULTIPLY_FCTR_VAL DECIMAL(15,12).

2.SOURCE : I HAVE MULTIPLY WITH ABOVE COLUMN WITH SOURCE WHICH CHAR IN NATURE
If Len(PURCH_TRANSTN_COND_Cpy1_ln.KONV_KAWRT ) = 0 Then SetNull() Else StringToDecimal(PURCH_TRANSTN_COND_Cpy1_ln.KONV_KAWRT) * StageVar


AND TARGET COLUMN IS DECIMAL(12,2) WHERE IT IS MAPPED WITH ABOVE 2 DERIVATION

tHANKS FOR HELPING ME MIKE :(

Posted: Mon Nov 17, 2008 1:54 pm
by pradeep_nov18
WHAT CONDITION I HAVE TO GIVEN FOR GETTING THE REJECT RECORDS IN MY CASE.

THANKS,

Posted: Mon Nov 17, 2008 2:09 pm
by Mike
No need for a condition. Just make sure it is the last link and you've checked otherwise.

How big is your CHAR field?

I still think the relevant part of your error message is most likely "too large for the destination decimal", but you'll have to capture some rejected rows to make that determination.

Are you just getting a few rejects or lots of rejects? You can try to cut down on the amount of your unit test data if you're getting buried in data. Maybe insert a Head stage...

Mike

Posted: Mon Nov 17, 2008 2:16 pm
by pradeep_nov18
My source field is char(15) is there any thing we have change in the transformation part ok wil try get some sample record at the o/p it is populating 0.00 has output for all the rows.

pradeep

Posted: Mon Nov 17, 2008 2:19 pm
by pradeep_nov18
My source field is char(15) is there any thing we have change in the transformation part ok wil try get some sample record at the o/p it is populating 0.00 has output for all the rows.

pradeep

Posted: Mon Nov 17, 2008 2:22 pm
by pradeep_nov18
But when i saw the source data it is different.

Posted: Mon Nov 17, 2008 3:53 pm
by Mike
You do realize that a Char(15) converted to a Decimal(15) multiplied by a Decimal(15,12) may not fit in a Decimal(12,2).

Temporarily increase the size of your output to a sufficiently large decimal format (e.g. Decimal(38,10)) and see if the error goes away.

Mike

Posted: Tue Nov 18, 2008 12:36 pm
by pradeep_nov18
Hi Mike,

The issue was as you told i recreated the table with my own structure,now it is propogating as expected

Thanks Mike for your reply