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

i have source like deptno,sal 1,2000 2,3000 3,4000 1,2300 4,5000 5,1100 i want target like target1 deptno,sal 1,2000 3,4000 4,5000 target2 2,3000 1,2300 5,1100 with out using transformerstage

6 Answers  


How can u write exception handling in seq file????

2 Answers   IBM,


root tree will find which is server job and which is parallel job?

0 Answers   IBM,


Hi all, explain one complex business rule that you had in your project and how did you accomplish it using DS?

1 Answers   HCL,


what is use of SDR function?

0 Answers   CGI,






Wat is pre-load in Hashed file

1 Answers   Patni,


Terminate Activity

0 Answers   CTS,


in sequtial file 2 columns avaliable,iwant only one column load the target how do it.

10 Answers   Wipro,


how to transfer file from one system to another system in unix? which cmd to be use?

5 Answers   Cap Gemini,


i have a some records eno ename acono amount 1001 suresh sbi101 12000 1001 suresh sbi101 14000 1001 is dublicata how can i remove duplicate?

4 Answers  


whom do you report?

0 Answers   NTT Data,


how to change left and right links in join stage?

4 Answers   Cap Gemini, IBM,


Categories