Drop duplicate records ...



SOURCE LIKE ..........

ID flag1 flag2

100 N Y

100 N N

100 Y N

101 Y Y

101 N Y

102 Y N

103 N N

104 Y Y

105 N N

106 N Y

102 N Y

105 Y Y

in above file if any id having both the flags as "N" then
that corresponding id records should be dropped,

in above case o/p should be as

ID flag1 flag2

101 Y Y
101 N Y
102 Y N
102 N Y
104 Y Y
106 N Y



Steps to do :

1) Identified the id’s that got duplicated (both the
flag values having vales “N”)

2) Look up with these id’s to existing id’s to drop .

Answers were Sorted based on User's Feedback



Drop duplicate records ... SOURCE LIKE .......... ID flag1 flag2 100 ..

Answer / dipal

step-1
Filter the record based on condition
Flag1=N AND Flag2=N ....link1
also defined a reject link
step-2
read link1 as left link and reject link as right link and
do inner join with Look up stage based on id
also define a reject link.
now the reject link will have required output.

Is This Answer Correct ?    3 Yes 0 No

Drop duplicate records ... SOURCE LIKE .......... ID flag1 flag2 100 ..

Answer / vz

Put a constraint in Transformer stage as shown bellow.

flag1=y or flag2=y


means

feald1=y or feald2=y

I think it's help you.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More Data Stage Interview Questions

Define orabulk and bcp stages?

0 Answers  


Describe the main features of datastage?

0 Answers  


hi my source is:: empno,deptno,salary 1, 10, 3.5 2, 20, 8 2, 10, 4.5 1, 30, 5 3, 10, 6 3, 20, 4 1, 20, 9 then target should be in below form... empno,max(salary),min(salary),deptno 1, 9, 3.5, 20 2, 8, 4.5, 20 3, 6, 4, 10 can anyone give data flow in data stage for the above scenario.... thanks in advance...

5 Answers  


if the source file is CID,CCODE,CONNDATE,CREATEDBY 0000000224,1000,20060601,CURA 0000000224,2000,20050517,AFGA 0000000224,3000,20080601,TUNE 0000000225,1000,20020601,CURA 0000000225,2000,20050617,AFGA 0000000225,3000,20080601,TONE AND TARGET is oracle following are the validations cid loaded with unique records leading zeors has to be deleted while loading cid in target load only customer who got early connected to company conn_date should be loaded into oracle date format cid datatype is varchar2 in target conn_date is data datatype ccode is varchar2 0000000224,1000,20060601,CURA 0000000224,1000,20060601,CURA

2 Answers  


How many jobs in ur project? Explain any complex job u have done in ur project?

1 Answers   IBM, TCS,






Differentiate between operational datastage (ods) and data warehouse?

0 Answers  


what is the difference between lookup stage reject link and merge stage reject link in datastage Parallel jobs?

9 Answers   HCL,


How many types of sorting methods are available in datastage?

0 Answers  


What is RCP?

2 Answers   TCS,


1)What is ur project architecture ? 2)how to move project from developement to uat? 3)What is the difference between datastage 6,7.1 and datasttage 7.5? 4).How to do error handling in datastage? 5)3.Whta is unit testing, system testing and integration testing? 6)What is the Exact difference between BASIC Transformer and NORMAL Transformer?When we will go for BASIC Or NORMAL Transformer 7)why we use third party tools in datastage? 8)What is the purpose of Debugging stages? In real time Where we will use?

6 Answers   CTS, HCL, IBM, Wipro,


Enlist various types of routines in datastage.

0 Answers  


How to Convert a string function to date function by using only sequential file stage with out using other stages ?

5 Answers   TCS,


Categories