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

by using dsjob..we can run only one job at a time?how can u run multiple jobs at a time in unix?

1 Answers  


how can we create a Sorrogate key in transformer stage? I want it in parallel mode

2 Answers   Syntel,


Wat is isolation level and when do u use them?

1 Answers   HP, IBM,


can we use sequential file as a lookup

7 Answers   Cognizant, Wipro,


how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?

0 Answers   Wipro,






Out of 4 mill records only 3 mill records are loaded to target and then job aborted. How to load only those 1 mill(not loaded records) for next run. This job is not sequential job, it is stand alone parallel job.What are the possibilities available in datastage8.1?

7 Answers   IBM,


Where do the datastage jobs get stored?

0 Answers  


what is the difference between lookup stage reject link and merge stage reject link in datastage Parallel jobs? interm of output in Merge Reject link and Look Up Reject link ?

4 Answers   HCL,


how to handle null values using transformer stage?

1 Answers  


what is combinability and non combinability?

2 Answers  


I have Seq file, I don't want 10, 11th(or any two records like 20, 30th records ) records in the output

6 Answers   TCS,


How To find the location of APT_confid file

2 Answers   CTS,


Categories