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
Define Data Stage?
What are the functionalities of link partitioner and link collector?
Difference between data warehousing and olap?
What are the steps needed to create a simple basic datastage job?
What is oci?
What is orabulk stage?
how many rows sorted in sort stage by default in server jobs
what are .ctl(control files) files ? how the dataset stage have better performance by this files?
Define Merge?
How do you remove duplicate values in datastage?
Differentiate between operational datastage (ods) and data warehouse?
Describe the architecture of datastage?
Name the third party tools that can be used in datastage?
How to read the length of word in unix?
Which warehouse using in your datawarehouse