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
What are the different common services in datastage?
Where do you see different stages in the designer?
What is Ad-Hoc access? What is the difference between Managed Query and Ad-Hoc access?
What is the difference between passive stage and active stage?
Explain datastage architecture?
Lookup constraints
On which Dimension Table you implemented SCD Type in your Project
Can we use target hash file as a lookup ?
Define data aggregation?
What is process model?
what is use of SDR function?
What is a ds designer?
How to reverse the string using SQL?
What is oci?
how to sort two columns in single job in datastage.