Page 1 of 1

Director warning Implicit conversion

Posted: Thu Apr 05, 2012 3:30 am
by LittelTony
Hi all,
i've following warning running a job with the Director:
"Implicit conversion from source type "decimal[38,10]" to result type "decimal[3,0]": Possible range/precision limitation" located in the initial OCI.
The OCI is binded to a View with a join and, in this case, we noticed that metadata of number fields are not recognized properly.
The original datatype was number (3,0) but with the join become number () and Director consider those fields as (38,10) so it is warning.
We tried to put a cast into the View to force metadata to be Number (3,0) but it's still warning.

Any help to remove those warnings would be appreciated

Thanks

Tony

Posted: Thu Apr 05, 2012 3:35 am
by chandra.shekhar@tcs.com
You can use message handler property available in director.

Posted: Thu Apr 05, 2012 3:54 am
by LittelTony
chandra.shekhar@tcs.com wrote:You can use message handler property available in director.
If i understood well, in that case every time i have this warning it'll be removed from log also when it's involving other jobs (not ONLY this).

Posted: Thu Apr 05, 2012 4:20 am
by pandeesh
Hi,
the best practice is fixing the real issue rather than avoiding them by using message handler.
In your case try to use the function

Code: Select all

DecimalToDecimal()
so that you can avoid the warning,.

Posted: Thu Apr 05, 2012 4:27 am
by pandeesh
LittelTony wrote: If i understood well, in that case every time i have this warning it'll be removed from log also when it's involving other jobs (not ONLY this).
That depends on the type of message handler, whether Project level or Job level

Posted: Thu Apr 05, 2012 6:30 am
by LittelTony
pandeesh wrote:Hi,
the best practice is fixing the real issue rather than avoiding them by using message handler.
In your case try to use the function

Code: Select all

DecimalToDecimal()
so that you can avoid the warning,.

I thought that but the warning is in the initial OCI so i can't put any transformer before...

Posted: Thu Apr 05, 2012 6:32 am
by qt_ky
Have you tried making the metadata match what's actually coming out of the first OCI stage? You can change the data type after that stage to something that you really want.

Posted: Sun Apr 08, 2012 9:10 pm
by kandyshandy
What Eris said is correct. You should stick to that 38,10 in OCI and do the length change in downstream transformer. ** No need for an explicit conversion in this case.

Posted: Sun Apr 08, 2012 10:11 pm
by ray.wurlod
I would be very concerned to verify that every single source value (irrespective of its metadata) could be shoehorned into the target data type. I'd be throwing an IsValid() check in there somewhere.