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


Please Help Members By Posting Answers For Below Questions

Have you used Unstructured data?

829


Differentiate between hash file and sequential file?

576


There are two file are there .1st file contains 5 records and 2nd file contain 10 records in target they want 50 records.how can achieve this

1801


Define APT_CONFIG in Datastage?

662


What is the process of killing a job in datastage?

585






Triggers,VIEW,Procedures

797


What is orabulk stage?

630


What is difference between join, merge and lookup stage?

634


How a source file is populated?

610


What is the difference between server job and parallel jobs?

662


What is meta stage?

577


What is the project in datastage?

664


How to convert RGB Value to Hexadecimal values in datastage?

3454


Differentiate between odbc and drs stage?

591


What is datastage engine?

728