SOURCE LIKE
I_D,F1,F2
---------
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
O/P LIKE
ID flag1 flag2
101 Y Y
101 N Y
102 Y N
102 N Y
104 Y Y
106 N Y
Answer Posted / akila
Looks like if both the flags for any ID are 'N' then all
the records of that particular ID are not sent to output.
For this, first sort the data using ID, F1, F2(all in asc
order).
Next in a transformer stage variables,
svOldID = svNewID
svNewID = ID
svCompare = If svOldID=svNewID then 'N' else 'Y'
svRejectedID= If svCompare='Y' and F1='N' and F2='N' then
ID else svRejectedID
In the output link contraint: ID<>svRejectedID
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How to implement complex jobs in data stage?
How many Key we can define in remove duplicate stage?
Enlist various types of routines in datastage.
How to Remove Duplicate using SQL?
Which commands are used to import and export the datastage jobs?
How to clean the datastage repository?
What are the primary usages of datastage tool?
DB2 connector> transformer > sequential file Data will be exported into a csv format in a sequential file. This file will be send in a email using a sequence job. Problem here is, how to avoid sending a blank csv file? When I ran the job there are chances that it might return zero records but in the sequence job csv file is going blank. how can I avoid this? thanks
what is the use of surogate key in datastage
In a batch if a job fails in between and you want to restart the batch from that particular job and not from the scratch then what will you do?
What are stage variables, derivations and constants?
How complex jobs are implemented in datstage to improve performance?
Define ds designer?
Can we use target hash file as a lookup ?
Differentiate between operational datastage (ods) and data warehouse?