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
What are the some differences between 7.x and 8.x version of datastage?
WAT TYPE OF PL/SQL QUERRYS USED IN DATASTAGE
What is the purpose of interprocessor stage in server jobs?
What are some prerequisites for datastage?
explain about completely flow of sequencers technicaly,without using example??explain about lookup,nullhandling?
if we using two sources having same meta data and how to check the data in two sources is same or not? and if the data is not same i want to abort the job ?how we can do this?
What are some different alternative commands associated with "dsjob"?
What are stage variables and constants?
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 many types of stage?
What is the differentiate between data file and descriptor file?
To see hidden files in LINIX?
What is orabulk stage?
Explain the datastage parallel extender (px) or enterprise edition (ee)?
What are the various kinds of the hash file?