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 |
how can we create a Sorrogate key in transformer stage? I want it in parallel mode
1)what is the size of Fact table and dimension table? 2)how to find the size of Fact table and dimension table? 3)how to implement the surrogate key in transform stage? 4)write the configuration file path? 5)how many types of datasets explain? 6)diff b/w developed projects and migration projects? 7)how to delete the header and footer file of the sequencer file? 8)how can u call the parameters in DS in unix environment? 9) how much data ur getting daily ? 10)
How do u set a default value to a column if the column value is NULL?
How to enter a log in auditing table whenever a job get finished?
How to write a expression to display the first letter in Caps in each word using transformer stage ? Please let me know ASAP Thanks in advance...
0 Answers Alpharithm Technologies,
Please Tell me..,I need some Complex Jobs in datastage as per in interview?how to tell and how to explain?please send as well as posiible please
1.What is the flow of Transformer? 2.How can you do INDEX table in DataStage level?
IS IT POSSIBLE TO USE DATASET AS A SOURCE FILE?
What is developer responsibilities in UAT (user acceptance testing and Post implementation phase?
What are the enhancements made in datastage 7.5 compare with 7.0?
Define Data Stage?
What is the difference b/w Hash file and Lookup Fileset stages?