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..........?
Answers were Sorted based on User's Feedback
In order to collect the duplicate values:
first cal the count output col in aggregator stage
group by col.
aggregator type: count rows.
count output col..
next, use the filter stage to separate the multiple occurrence.
finally, use the join stage or lookup stage to map the two
tables join type INNER ..
then u can get the desired output..
| Is This Answer Correct ? | 14 Yes | 1 No |
Answer / chandu
use aggregator and calculate count of source column after
that use filter or transaformer stage use condition as count
>1 it gives only duplicate records
Thanks
Chandu-9538627859
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / 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 |
Answer / sudheer
- aggregator -
seq. file - copy join - filter - seq.op
in arrg - cnt rows
in join - left outer join - left as seq.file data
in filter - where cond. - cnt>1
| Is This Answer Correct ? | 1 Yes | 0 No |
Job Design:
|----->Agg--->Filter1-->|
| |
| |
file-->cp-------------------->Join---->Filter2---->target
Agg: use aggregator and select Agg_type=count rows and then give the Count O/P column=Count (User defined).
Filter1: give the condition Count<>1
Join: select left outer join
Filter2: give the condition Count<>0
u will get the right output....what ever the duplicate records.
and if u want unique records, give the condition Count=0
| Is This Answer Correct ? | 0 Yes | 0 No |
Job Design:
Agg--->Filter1---------->|
| | Unique
file-->cp-------------------->Join---->Filter2---->target1
|
|-->Duplicate
Target2
Agg: use aggregator and select Agg_type=count rows and then give the Count O/P column=Cnt (User defined).
Filter1: give the condition Where=Cnt=1
U will get unique values like 200,400,500,600
Use Join (Or) Lookup stage: select left outer join
Filter2:
Where=Column_name='' (Duplicate values like 100,100,300,300,300)
Where=Column_name<>'' (Unique Values like 200,400,500,600)
u will get the right output....what ever the duplicate records.
Plz correct me if am wrong.....
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / pooja
Follow the following steps -
1. Seq file stage - Read the input data in seq file - input1.txt
2. Aggregate stage - count the number of rows (say CountRow) for each ID(group=ID)
3. Filter stage - Filter the data where CountRow<>1
4. Perform join on the output of the step 3 and input1.txt.
You will get the result :)
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / me
seq----> copy
from copy stage one link to aggregator apply count rows option ---> filter (on count rows output 1 ) send as reference to look up below
from copy stage second link to lookup
apply filter
| Is This Answer Correct ? | 0 Yes | 0 No |
What is lookup table?
Hi frnds, my scenario is like i'm having a record 1234"1323£3434%343434^23232!1212$23232 in the above record all the special characters must be removed.how can we do it in datastage 8.0.1.can any one please ans this? thanx in advance
i have 3 diffrent tables. 1) US rate data 2)CANADA rate data and 3)MEXICO rate data. All 3 tables have 6 collumns each. 4 collumns are commun to all tables and 2 are diffrent. Now at target i want single table say Country rate which will have (4+2+2+2+1 flag) 11 collumns. I will add a flag collumn which will indicate country and will put nullable collumns which are not common to other. How i can implement this in datastage?
What is developer responsibilities in UAT (user acceptance testing and Post implementation phase?
how many stages are there in Datastage... Please clarify mee??
if 3 table having different columes. like first table having 4 columns , second table having 3 columns and third table having 2 columns then how to capture the data by using funnel stage in parallel jobs...srinu.thadi
17 Answers IBM, TCS,
In Informatica,for the table I can find coreesponding dependent mappings.Likewise can I find the dependent jobs with all the information by using the table name
Different ways a project can be moved to production ?...example ….export-import and Version control.
In Sequential file, how can i split a column into two, and that column contains string datatype. For Example, i have column of string datatype as subedar khaja. Now i want get output as separately with subedar in one column and khaja in second column. How? Coula anybody, solve it?
how to export or import the jobs in .ISX file
How do you register plug-ins?
HOW WILL YOU IMPLEMENT SURROGATE KEY IN SCD BY USING SURR_KEY GENERATOR,THE VALUE OF S_KEY SHOULD NOT REPEAT EVEN IF THE JOB IS COMPILED REPEATEDELY?