Modify Stage datatype conversions

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
madsongtel
Participant
Posts: 31
Joined: Fri Aug 01, 2008 2:56 am

Modify Stage datatype conversions

Post by madsongtel »

Hi Team,

Please tell me how to do for my below questions.

I have column COLUMN_A datatype is string(10), i want to convert it into Decimal(10,2).
One more column COLUMN_B datatype is string(10), i want to convert it into Integer(10).
One more column COLUMN_C datatype is string(10), i want to convert it into Date(10)(yyyy-mm-dd) format.


Please suggest how to do this in modify stage
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Re: Modify Stage datatype conversions

Post by pandeesh »

a)StringToDecimal is the good choice for column_A

b)For column_B ,go with AsInteger

c)StringToDate is the good option for column_C

There are a lot of ways to achieve this.
Please use search option here befor posting new topics.
pandeeswaran
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

None of what pandeesh suggested will work with the Modify stage. They are functions to be used in a Transformer stage.

Typically Transformer stage functions have "To" names, like StringToDecimal(), whereas Modify stage functions have "_from_" names, like decimal_from_string() or date_from_string().
pandeesh wrote:a)StringToDecimal is the good choice for column_A

b)For column_B ,go with AsInteger

c)StringToDate is the good option for column_C
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

sorry ray!!
I have forgot to mention those are functions available in transformer stage!

I tried to give the alternative for modify stage.

Sorry! :(
pandeeswaran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

They didn't ask for alternatives, they asked for help with the Modify stage. :?

And while I'm here - please stop using Reply with quote every single dang time you need to respond. It's annoying when done for no good reason and means I constantly have to come along behind and clean up after you. There a perfectly lovely Reply to topic button, use it unless you really need to quote something to clarify your response.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply