Page 1 of 1

Un-handled conversion error in a join stage

Posted: Wed Apr 25, 2007 7:48 am
by DStage_Developer
Hi all.

I have a question. I'm using a join stage and I get the error below when running the job. The join key is defined differently in the tables themselves. i.e. the join key in table a is defined as an integer 10 while in table b it is a small int 5. Any assistance is greatly appreciated!

Join_364,1: Un-handled conversion error on field "PRD_GRP_ID " from source type "int32" to destination type "int16":
source value="32877"; the result is non-nullable and there is no handle_null to specify a default value.

Re: Un-handled conversion error in a join stage

Posted: Wed Apr 25, 2007 10:45 am
by sud
Well the error statement is self explanatory. The table where you have small int, you should put as integer, datastage is actually converting both to smallint and doing the comparision and failing since your table a has bigger numbers coming in. Also, handle the nullability. For this you can place a condition which says that the lookup should be done only for non-null values.

Re: Un-handled conversion error in a join stage

Posted: Wed Apr 25, 2007 12:35 pm
by DStage_Developer
I've tried to change the data type in the join stage. That didn't work. I received the same error. Also, where can I modify the lookup condtion on the join. I'm very new with Dstage. Any help is greatly appreciated!

Re: Un-handled conversion error in a join stage

Posted: Wed Apr 25, 2007 12:42 pm
by sud
DStage_Developer wrote:I've tried to change the data type in the join stage. That didn't work. I received the same error. Also, where can I modify the lookup condtion on the join. I'm very new with Dstage. Any help is greatly appreciated!
Inside the lookup stage if you look at the left side where it shows the input links, the reference link box will have a place called "Condition". Double click there and you will be able to specify condition.

But I think the problem is because of the datatypes ... please change the datatype of both the input link key columns to integer instead of small int. It should work.

Re: Un-handled conversion error in a join stage

Posted: Wed Apr 25, 2007 12:53 pm
by DStage_Developer
I changed both input links to integer 10 on in the join stage. Had the same result.

I dind't see the condition in the join stage. I looked under the general, properties, and advanced tabs

Re: Un-handled conversion error in a join stage

Posted: Wed Apr 25, 2007 12:55 pm
by sud
DStage_Developer wrote:I changed both input links to integer 10 on in the join stage. Had the same result.

I dind't see the condition in the join stage. I looked under the general, properties, and advanced tabs
oops join stage ... i am sorry, it is there in lookup :!:

Also, please see the datatype in the output in the join stage. That should be integer as well.