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

how can we join one oracle & flat files ?

2 Answers   ME,


difference between function and procedure...

1 Answers   IBM,


Demonstrate experience in maintaining quality process standards?

0 Answers   iGate,


How to remove blank spaces from data?

3 Answers  


How do y read Sequential file from job control?

2 Answers   HP, IBM, Telesis,






how CAN we remove duplicates in dataset?

2 Answers   IBM,


Which commands are used to import and export the datastage jobs?

0 Answers  


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 the use of datastage designer?

0 Answers  


How to create environments and call them? What is the use defined variables?

2 Answers   HCL, ME,


Can we use target hash file as a lookup ?

0 Answers  


What is RCP

5 Answers   CGI, CTS,


Categories