Which stages to use?

Infosphere's Quality Product

Moderators: chulett, rschirm

Post Reply
subramanya
Participant
Posts: 22
Joined: Fri Oct 15, 2004 11:53 pm
Location: Bangalore, India
Contact:

Which stages to use?

Post by subramanya »

Hi,
I am new to QS. I need to do the follwing transformations. Which stages should i use and how?

source data conatining

" " shud be replaced with $B$
Null shud be replaced with NULL
< shud be replaced with &LT
> shud be replaced with &GT
|shud be replaced with #123

Thnx
Subramanya
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If I were doing this design I would perform the transformations in DataStage using a Transformer stage, before invoking QualityStage via one, or a series of, QualityStage stage(s).

As far as replacing ">" with "&GT" and "<" with "&LT", it appears that you're trying to create HTML tags, but you're leaving off tag terminators. Did you mean "&GT;" and "&LT;"? If generating XML - or even HTML - is what you're trying to do, even DataStage isn't really the appropriate tool.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
holygrail
Participant
Posts: 9
Joined: Wed Nov 10, 2004 4:14 am

Post by holygrail »

Better still create a routine that goes like

Transform1 = Change(A_RawData,"'","&apos;")
Transform2 = Change(Transform1,"&","&")
Transform3 = Change(Transform2,"<","<")
Transform4 = Change(Transform3,">",">")
Transform5 = Change(Transform4,"","$B$")
Transform6 = Change(Transform5,\"\,""")

Ans = Transform6
Return (Ans)

Use this Routine on the fields in the Stage Variables of a Transformer.
JamasE
Participant
Posts: 32
Joined: Sun Aug 31, 2003 5:52 pm

Re: Which stages to use?

Post by JamasE »

subramanya wrote:Hi,
I am new to QS. I need to do the follwing transformations. Which stages should i use and how?
Ignoring DS solutions, this could be done with custom built rule sets in a Standardise stage, making sure most of the SEPLIST isn't in the STRIP list. But it would take a while to write, especially for someone new to that area...

Cheers,
Jamas
DSkkk
Charter Member
Charter Member
Posts: 70
Joined: Fri Nov 05, 2004 1:10 pm

Parse stage is the best fit

Post by DSkkk »

Hey!! This can be done easily in a Parse stage. But this is possible if, all the changes that u require to perform are in a singe column. I.e If u require to do these manipulations on a single field then, u have an option in parse stage to specify the input value and the value u need to replace it with.

Hope that helps!!!

Cheers.
DSkkk
g.kiran
Post Reply