convert INT to TINY INT in datastage?

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
pkll
Participant
Posts: 73
Joined: Thu Oct 25, 2012 9:45 pm

convert INT to TINY INT in datastage?

Post by pkll »

Hi All,

My source column datatype is INT 2 and
My output column datatype is TINY INT 3
when I execute job I am getting below warning message.
Implicit conversion from source type int8 to result type uint8 possible range limitation
Please advice me how to convert INT to TINY INT in datastage?

Thanks In Advance..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You already are. That's just a warning alerting you to the fact that your data may not fit. If you somehow know that it always will, demote it. Otherwise you'll need some sort of a legitimate conversion algorithm to manipulate 4 bytes to fit into 1.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

You've already done it.

Fyi, the warning message that you quoted has nothing to do with your source integer which would be an int32.

The warning message is telling you that there was an implicit conversion of a signed tinyint (int8) to an unsigned tinyint (uint8)... the obvious range limitation being that the target can not hold negative values.

You can avoid the warning message by doing an explicit conversion.

Mike
Post Reply