i have a scenario like two columns(Empno, Ename) in that duplicate records are there, so my question is how to get second duplicate record in datastage.

Answers were Sorted based on User's Feedback



i have a scenario like two columns(Empno, Ename) in that duplicate records are there, so my question..

Answer / reddy

Source File/Table--->Transformer-->Target

Transformer stage:
---------------------------
Take two stage variables

sv-->Empno or Ename (drag and drop column(s))

sv1-->if Empno=sv or Ename=sv Then sv1+1 Else 1

in constraint --> sv1=2

u will get second duplicate record

Plz correct me if i am wrong...

Is This Answer Correct ?    2 Yes 0 No

i have a scenario like two columns(Empno, Ename) in that duplicate records are there, so my question..

Answer / pavani

if we have n duplicates
source---->transformer-------->target.
in transformer we define 2 stage variables
if empno=stg_var2 then stg_var1+1 else 1------->stg_var1;
emp_no-------->stg_var2;

now the constraint for target is stg_var1=2

Is This Answer Correct ?    2 Yes 0 No

i have a scenario like two columns(Empno, Ename) in that duplicate records are there, so my question..

Answer / narasimha rao k

By using Removeduplcate stage in datstage

This stage having avalabel Removeduplicate 1st and last you select last automatically apply to second duplicate data

Is This Answer Correct ?    6 Yes 6 No

i have a scenario like two columns(Empno, Ename) in that duplicate records are there, so my question..

Answer / nish

remove duplicate-> retail last

Alternate MEthod: if there are only two occurences then sort stage-> descending-> remove duplicates

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Stage Interview Questions

how to change left and right links in join stage?

4 Answers   Cap Gemini, IBM,


What are orabulk and bcp stages?

0 Answers  


Why we use surrogate key?

0 Answers  


What is the use of hoursfromtime() function in transformer stage in datastage?

0 Answers  


If I make any changes in the parallel job,do I need to implement the changes in the sequencer job,else the changes will be reflected automatically

6 Answers   TCS,






my source seq file have col1 1 2 3 4 5 6 7 8 9 i have 4 targets t1 t2 t3 t4 1 2 3 4 5 6 7 8 9 like this how we can get?

10 Answers   Polaris,


What is difference between symmetric multiprocessing and massive parallel processing?

0 Answers  


Can you explain players in datastage?

0 Answers  


Is there no issue when you try to convert a NOt null column in nullable and vice versa in aggregator styage and transformer stage? When I tried i got the warnings but in a running code I can see such type of scenarios. Please explain

2 Answers  


Hi I have scenario like this s/r table T/r table ename,sal empno,ename,sal vijay,2000 1 , vijay, 2000 kumar,3000 2 ,kumar , 3000 ravi ,4000 3 ,ravi , 4000 How can i get target table like that without using Transformer stage?

8 Answers   Semantic Space,


Why fact table is in normal form?

0 Answers  


how to clear the source file? 2) diff b/t odbc & Oracle?what is node? 3) explain one complex job u face in ur project

2 Answers   Wipro,


Categories