i want send my all duplicate record one tar and all uniq
records one target how we will perfome explain
example:
input data
eid
251
251
456
456
951
985
out put/target1
251
251
456
456
out put/target2
951
985
how we will bring

Answers were Sorted based on User's Feedback



i want send my all duplicate record one tar and all uniq records one target how we will perfome ex..

Answer / anil

Hi,

This can be do easily with loops in transformer stage

Design 
--------
Sq File - > Aggregrate - > Transformer - > Unique
                                |
                              Duplicate

1. In aggregate, calculate no of rows say counts
2. In transformer , define a stage variable stgTest whose derivation is if counts > 1 then 'Duplicate' Else 'Single'
3. In the loop condition define @iteration < Counts
4. Take a loop variable saying lopNumbers = EID
5. Now for Unique link write constraint as stgTest = 'Single' and output derivation of EID = @iteration.
6. Now for Duplicate link write constraint as stgTest = 'Duplicate' and output derivation of EID = @iteration.
7. Now you will get duplicate values in one link and unique values in another link.

Is This Answer Correct ?    0 Yes 1 No

i want send my all duplicate record one tar and all uniq records one target how we will perfome ex..

Answer / sreenu

Using aggregation and filter stage,
In aggregation stage we calculate the count of incoming
records and in filter we use count<>1 for output1, count=1 for
output2...

Is This Answer Correct ?    1 Yes 4 No

i want send my all duplicate record one tar and all uniq records one target how we will perfome ex..

Answer / vsandu

just sort the data ,and bring key changevalues by using
sort ,
in transformer write a logic if group id is 1,0 then target
1 else if group id is anly 1 then target2

as per my knowledge ,if any mistake correct me

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More Data Stage Interview Questions

How to perform incremental load in datastage?

0 Answers  


how to delete one row in target dataset

0 Answers   Satyam,


wt is the diff b/w odbc and oracle stage

2 Answers   Accenture, HCL,


Have you used Unstructured data?

0 Answers   CTS,


Define orabulk and bcp stages?

0 Answers  






What are sequencers?

0 Answers  


What are the benefits of datastage?

0 Answers  


file having these input and we have to get 3 output using same job Input 1 1 1 2 3 4 4 4 o/p1 o/p2 o/p3 1 1 2 2 1 3 3 1 4 4 4

0 Answers  


Hi am sundar, i have datas like 00023-1010 00086-1010 00184F2-1010 . . . . SCH-AS-1010 200-0196-039 . . . Now i want the result "SCH-AS" in onee column and "1010" in another column.. Can any one tell the answer...

5 Answers  


Difference between the Sequence and Sequencer in DS?

1 Answers   TCS,


i have a table col1 10 20 30 40 10 20 50 my requirement is how to retrive only duplicates like 10 10 20 20 like this how it's possible in SQL?

11 Answers   Cap Gemini,


Enlist various types of routines in datastage.

0 Answers  


Categories