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
Answer Posted / srinivas
Use below stage variables
create 4 stage variables
STG1 =NAME:COMPANY
STG2=1
STG3= IF STG1:STG4 THEN STG3+1 ELSE STG2
STG4= STG1
create extra column for store this ranks.
After this stage use the sort stage to sort the data based on ranking column.
Then will get the exact output what we are looking.
krish IBM 1
pooja TCS 1
nandini WIPRO 1
krish IBM 2
pooja TCS 2
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How many types of hash files are there?
What is a folder? Difference types of stages?
If we take 2 tables(like emp and dept),we use join stage and how to improve the performance?
In Datastage, how you can fix the truncated data error?
Can you explain link buffering?
Difference between ‘validated ok’ and ‘compiled’ in data stage?
What are the different layers in the information server architecture?
Distinguish between informatica & datastage. Which one would you choose and why?
What are constraints and derivations?
Hi , Can anyone give few examples of scenarios and there corresponding design in datastage..i am new to this tool...confused in design while my manager asking to design the job.. Please post the URL if there..so i can go through it.. Thanks in advance...
how to sort two columns in single job in datastage.
Define ds designer?
What is the precedence of stage variables,derivations, and constraints?
What are the areas of application?
What are some different alternative commands associated with "dsjob"?