one file contains
col1
100
200
300
400
500
100
300
600
300
from this i want to retrive the only duplicate like this
tr1
100
100
300
300
300 how it's possible in datastage?can any one plz explain
clearley..........?

Answer Posted / prasad

>Agg--->Filter1------->|
| |
| |
file-->cp-------------------->Join---->Filter2---->target1
|
|
Target2
Agg: use aggregator and select Agg_type=count rows and then give the Count O/P column=Count (User defined)

Count
------------
100--2
200--1
300--3
400--1
500--1
600--1
it will generate in Agg stage then

Filter1: give condition like Count=1( u will get unique records from Filter1)

Join Stage: take Left Outer Join

Filter2:
where=column_name=''(null){u will get duplicates records)

Target1 o/p:
100
100
300
300
300

where= column_name<>''(u will get unique records)

Target2 o/p:

200
400
500
600

Please correct, if am wrong :)

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use target hash file as a lookup ?

2814


explain about completely flow of sequencers technicaly,without using example??explain about lookup,nullhandling?

1927


how do u catch bad rows from OCI stage? And what CLI stands for?

2281


EXPLAIN SCD

960


What is active and passive stage?

876






how to get sum of sal based on dept_no and then sum of all sal irrespective of dept_no in same sql. output:- 10, 200(sum of sal for dept_no 10), 5000(sum of all sal)

521


What are sequencers?

616


What are the some differences between 7.x and 8.x version of datastage?

737


What is staging variable?

622


Where the datastage stored his repository?

616


how many rows sorted in sort stage by default in server jobs

3554


What is the method of removing duplicates, without the remove duplicate stage?

580


What all the types of jobs you developed?

665


how to abort the job its matain duplicates?

2100


What are the different type of jobs in datastage?

602