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 / ankit gosain
Hi ALL,
Job Design:
SourceSeqFile--->SortStage--->Transformer--->TgtSeqFile
1. In Sort Stage, take two key, name & company and then go
to options and create a keyChange column.
2. In transformer stage, create a stage variable of integer
type (say Var1) and write in it's derivation:
if keyChange=1 then 1 else Var1+1
3. Now create a new column in tgt (say count) and in
transformer, assign that Var1 to the derivation of count.
4. Goto o/p tab of transformer and there sort the data on
count column.
You'll get the desired output.
If you have more queries, you can mail me on
ankitgosain@gmail.com
Cheers,
Ankit :)
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What are the different type of jobs in datastage?
What is difference between server jobs & parallel jobs?
Explaine the implimentation of scd's in ds indetail, please send me step by step procedure to perform scd's 1,2,3. Please replay for this, Thanks in advance
What is developer responsibilities in UAT (user acceptance testing and Post implementation phase?
what is flow of project?
What are routines in datastage? Enlist various types of routines.
Lookup constraints
Differentiate between operational datastage (ods) and data warehouse?
What are the differences between datastage and informatica?
Can you explain tagbatch restructure operator?
What are stage variables?
what is the use of skid in reporting?
Describe the architecture of datastage?
What is ibm datastage?
Can anyone tell me a difficult situation who have handled while creating Datastage jobs?