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
Modify Stage datatype conversions
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 31
- Joined: Fri Aug 01, 2008 2:56 am
Re: Modify Stage datatype conversions
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.
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
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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().
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
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.
![Confused :?](./images/smilies/icon_confused.gif)
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
"You can never have too many knives" -- Logan Nine Fingers