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 <
> shud be replaced with >
|shud be replaced with #123
Thnx
Subramanya
Which stages to use?
-
- Participant
- Posts: 22
- Joined: Fri Oct 15, 2004 11:53 pm
- Location: Bangalore, India
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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 ">" and "<" with "<", it appears that you're trying to create HTML tags, but you're leaving off tag terminators. Did you mean ">" and "<"? If generating XML - or even HTML - is what you're trying to do, even DataStage isn't really the appropriate tool.
As far as replacing ">" with ">" and "<" with "<", it appears that you're trying to create HTML tags, but you're leaving off tag terminators. Did you mean ">" and "<"? 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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Better still create a routine that goes like
Transform1 = Change(A_RawData,"'","'")
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.
Transform1 = Change(A_RawData,"'","'")
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.
Re: Which stages to use?
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...subramanya wrote:Hi,
I am new to QS. I need to do the follwing transformations. Which stages should i use and how?
Cheers,
Jamas
Parse stage is the best fit
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
Hope that helps!!!
Cheers.
DSkkk
g.kiran