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


Please Help Members By Posting Answers For Below Questions

What is the purpose of interprocessor stage in server jobs?

1727


How many Key we can define in remove duplicate stage?

822


what should be ensure to run the sequence job so that if its get aborted in 10th job before 9job should get succeeded?

955


What is the differentiate between data file and descriptor file?

863


What is the difference between operational data stage (ods) and data warehouse?

675






Explain the situation where you have applied SCD in your project?

1562


What is difference between symmetric multiprocessing and massive parallel processing?

655


What is staging variable?

624


Is possible to create skid in dim,fact tables?

2191


Can you define merge?

668


If you want to use a same piece of code in different jobs, how will you achieve this?

796


Which warehouse using in your datawarehouse

1682


What are the types of containers in datastage?

705


Field,NVL,INDEX,REPLACE,TRANSLATE,COLESC

970


Highlight the main features of datastage?

615