Cleaning a particular pattern/text : DataStage

Infosphere's Quality Product

Moderators: chulett, rschirm

Post Reply
divstands
Participant
Posts: 128
Joined: Wed Jun 03, 2009 9:48 am

Cleaning a particular pattern/text : DataStage

Post by divstands »

Can a particluar string/text be cleared in the transformer in DataStage

For example:
If an input field is "SAN PEDRO 7777777 ARRIBA"

and we want to remove 7777777 and produce the output as

"SAN PEDRO ARRIBA"

Can this be done? If yes, please help with the syntax.
Divya
JRodriguez
Premium Member
Premium Member
Posts: 425
Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:

Post by JRodriguez »

Oconv(InputCol, "MCA")
Julio Rodriguez
ETL Developer by choice

"Sure we have lots of reasons for being rude - But no excuses
divstands
Participant
Posts: 128
Joined: Wed Jun 03, 2009 9:48 am

Post by divstands »

JRodriguez wrote:Oconv(InputCol, "MCA")
I guess OCONV would not help for my requirement. I looked for it. Hope CHANCE function helps
Divya
JRodriguez
Premium Member
Premium Member
Posts: 425
Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:

Post by JRodriguez »

Ohh! you are only parallel then this will do the trick

Convert("0123456789",'', InputCol )

Also while standardizing your data you can assign the null class to numeric token....
Julio Rodriguez
ETL Developer by choice

"Sure we have lots of reasons for being rude - But no excuses
divstands
Participant
Posts: 128
Joined: Wed Jun 03, 2009 9:48 am

Post by divstands »

JRodriguez wrote:Ohh! you are only parallel then this will do the trick

Convert("0123456789",'', InputCol )

Also while standardizing your data you can assign the null class to numeric token....
no... i just want to remove 77777777 if it exist in the string
Divya
divstands
Participant
Posts: 128
Joined: Wed Jun 03, 2009 9:48 am

Post by divstands »

JRodriguez wrote:Ohh! you are only parallel then this will do the trick

Convert("0123456789",'', InputCol )

Also while standardizing your data you can assign the null class to numeric token....
no... i just want to remove 77777777 if it exist in the string
Divya
JRodriguez
Premium Member
Premium Member
Posts: 425
Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:

Post by JRodriguez »

If is only 77777777 that you want to remove then

Convert("7",'', InputCol )

It will only remove the string if exist ...else your input value will return
Julio Rodriguez
ETL Developer by choice

"Sure we have lots of reasons for being rude - But no excuses
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Or a simple If..Then..Else expression in a Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Don't guess, read the docs! Search the forums for a posted PX version of the Server EReplace function by DSGuru2B, that will do the substitution you need.
-craig

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