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
Source has 2 columns: USA,NewYork INDIA,MUMBAI INDIA,DELHI UDS,CHICAGO INDIA,PUNE i want data in target like below: INDIA,MUMBAI1 INDIA,DELHI2 INDIA,PUNE3 USA,NEWYORK1 USA,CHICAGO2
What is the difference between server job and parallel jobs?
In work load management there are three options of Low priority, Medium priority and High Priority Jobs which can be used for resource management. why this feature is developed when there is already jobs prescheduled by scheduler or autosys. what will be the use of workload management then?
If we take 2 tables(like emp and dept),we use join stage and how to improve the performance?
What are the different options associated with dsjob command?
1.new record it will insert but changes of natural key is not present in taget i want to update (here key is composite natural key )can any one help this to explan how to do
Explain usage analysis in datastage?
What are the difference types of stages?
If you want to use the same piece of code in different jobs, how will you achieve it?
How to create a file using vi editor? 2)how to delete a file in vi editor? 3)How to connect the server datastage to unix? what r the command lines we r using? 4)30 jobs r runnig in unix i want to find out my job. how to do this? give me command?
What is a datastage job?
What are stage variables, derivations and constants?
What are the components of datastage?
Why do you need stage variables?
How a source file is populated?