source file having the data like aabbccc, i want target file
result like a1a2b1b2c1c2c3.
Answer Posted / srinivas
We can do this with below major steps.
i)First split the data into rows each character as one row this can be done by below function in basic trnsformer
Convert(@TM,@FM,Fmt('aabbccddee', "1T"))
ii)Then next step take four stage variables in next transformer apply below logics
stg1----> Outputcolumn of first transfermer.
stg2----> 1
stge3----> if stg4=stg1 then stg3+1 else stg2
stg4----> stg1
stge5----> stg1:stge3
now we will get the below ansr
o/p column
a1
a2
b1
b2
c1
c2
d1
d2
iii)Then convert the rows into one single column.
Thanks
Srini
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Define data aggregation?
What is staging variable?
How you Implemented SCD Type 1 & Type 2 in your project?
Name the different types of Lookups in Datastage?
What is a ds designer?
Define Job control?
What are the differences between datastage and informatica?
What is merge stage?
Hi everyone,I have kept a project Sales And Distribution for a pharmaceutical company.can anybody explain one complex business rule that we had in our project and how did you accomplish it using DS?
Define orabulk and bcp stages?
Can we use target hash file as a lookup ?
What is datastage engine?
for example You have One Table with 4 Columns (Mgr ID, Department ID, Salary, Employee ID). Can you find out the Average Salary and Number of Employee present per Department and Mgr
Explain ibm infosphere information server and highlight its main features?
What is Ad-Hoc access? What is the difference between Managed Query and Ad-Hoc access?