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 .

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of containers and how to create them?

645


What are routines in datastage? Enlist various types of routines.

727


What are the components of ascential data stage?

746


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

2023


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

668






Difference between ‘validated ok’ and ‘compiled’ in data stage?

773


What are sequencers?

715


1)s.key generate 1 to 700 records today. tomorrow another 400 will updated how to update the records using s.key generator? 2)source is like :-- DB --> T/F stage1 --> seq1file T/f 1 is linking with T/F2 ---> seq 2 how to load the data? in source i given some conditions those r going in seq1. The another data will going to seq2 how to do this ?

1714


What are the different kinds of views available in a datastage director?

687


What is the difference between Datastage 7.5 and 7.0?

757


Explain connectivity between datastage with datasources?

687


Distinguish between informatica & datastage. Which one would you choose and why?

663


describe the Steps to confiure a Qlogic switch

2050


Triggers,VIEW,Procedures

900


What is staging variable?

721