Page 1 of 1
Which stages to use?
Posted: Tue Apr 12, 2005 4:15 am
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 <
> shud be replaced with >
|shud be replaced with #123
Thnx
Subramanya
Posted: Tue Apr 12, 2005 2:39 pm
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 ">" 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.
Posted: Thu Apr 14, 2005 11:49 pm
by holygrail
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.
Re: Which stages to use?
Posted: Sun Apr 17, 2005 6:48 pm
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
Parse stage is the best fit
Posted: Sat Apr 23, 2005 9:51 am
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