Page 1 of 1

Implicit conversion from source type

Posted: Fri Dec 19, 2008 2:03 am
by kksr
Hi All

I have a source column whichis having length of 40 , I need to do a lookup with another table and the olumn lngth of Looup table is 26 ,after running the job I am getting this Warning.

"Implicit conversion from source type "string[40]" to result type "ustring[max=26]": Possible truncation of fixed length string. "

How to handle this warning in job level.

Thanks in Advance
Kiran

Posted: Fri Dec 19, 2008 2:09 am
by balajisr
How can you expect a string whose length is 40 to compare correctly with string length of 26?

Why don't you increase the length of lookup column to 40?

Posted: Fri Dec 19, 2008 2:20 am
by kksr
Source column length is 40(Its fixed widath file) , but the actual length of the value is 26 , the lookup is working fine loading the data in target , only concern is warning .

Posted: Fri Dec 19, 2008 3:19 am
by balajisr
If you are confident that rest of length are spaces you can demote this warning into an info using message handler.

But still, i would rather prefer transforming the source to have length of 26 before lookup. In this case message handler is not required.

Posted: Fri Dec 19, 2008 5:59 am
by kksr
Mesage Handler is not enabled for me , is there any othe ralternative , pls suggest

Thanks in advance

Posted: Fri Dec 19, 2008 6:15 am
by srinivas.g
use modify stage and convert source size 40 to 26 and do the look up.

your problem resolved.

Posted: Fri Dec 19, 2008 6:19 am
by balajisr
kksr wrote:Mesage Handler is not enabled for me , is there any othe ralternative , pls suggest

Thanks in advance
I guess i had given an alternative in my previous post.

Posted: Tue Dec 23, 2008 4:53 am
by Hari_Reddy
just you can increse the lenth of Lookup table Column is 40. then you can not get this type of worning,

Posted: Tue Dec 23, 2008 5:08 am
by AmeyJoshi14
Hari_Reddy wrote:just you can increse the lenth of Lookup table Column is 40. then you can not get this type of worning,
Or
do substring in the source
Or
do substring in the lookup stage.
that is column_name[1,26]

Same solution as balajisr said! :D

Hope this will help you out!! :wink:

Posted: Tue Dec 23, 2008 5:46 am
by ArndW
You can put a job level or project level handler to demote this warning message and suppress it from the log; but as you can see from the reactions of the other posters, this is not a good idea and the best (and correct) solution is to avoid this truncation problem by either making the fields appropriately sized or by using an explicit truncation function on the larger string and redefining it to the shorter length.