source file having the data like aabbccc, i want target file
result like a1a2b1b2c1c2c3.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / ramki
The same logic we can implement for as per the below Q
souce file having the columns like name company krish IBM
pooja TCS nandini WIPRO krish IBM pooja TCS if first row
will be repeat i want the result like this name company
count krish IBM 1 pooja TCS 1 nandini WIPRO 1 krish IBM 2
pooja TCS 2
| Is This Answer Correct ? | 1 Yes | 4 No |
What are the prerequisites for join stage
how to implement scd2 in datastage 7.5 with lookup stage
What is a delta record? How you will read it?
What is difference between 8.1 , 8.5 and 9.1 ?
Hi, i did what you mentioned in the answer, i.e. source- >Transformer -> 3 datasets. Iam able to see the data in datasets but its not sort order... Can you tell how sort the data?? i also checked Hash partition with performsort.
What are the different layers in the information server architecture?
IN SEQUENTIAL FILE,I HAVE DATA LIKE THIS EID,ENAME 11,AA 11,CC 22,DD 33,EE 22,AA 22,BB 22,CC 11,BB THEN i SELECT perform sort ON eid,uncheck both unique,stable AND I CHOOSE hash SORTING.WHAT IS THE OUTPUT I CAN GET.what happend if i select UNIQUE,STABLE. PLEASE EXPLAIN HOW THE RECORDS DISPLAY AT TARGET.
What are the different database update actions available?
how can u connect the client system directly at any time?
source file having the data like aabbccc, i want target file result like a1a2b1b2c1c2c3.
which dim, fact tables used in bank domain
What all the types of jobs you developed?