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

A signal has a wavelength of 1 micro min in air.how far can the front of the wave travel during 1000periods?

2135


how to abort the job its matain duplicates?

2228


what is stage is used for below Input columns: dept|mgr|employee|salary Output columns: mgr|count of employee per mgr|avg salary per dept note: each dept has one mgr and each mgr has many employees

749


how to achieve this output ? Two Input columns(ID & Name) - ID | Name 1 | Jack 1 | Kara In output there should be only 1 column which will be populated as - 1,Jack 1,Kara

465


What are the different types of lookups in datastage?

708






What are routines in datastage?

919


What are the different options associated with dsjob command?

1081


8000 jobs r there i given commit, suddenly job will abort? what happens? 2)diff b/t transformer stage & filter stage? 3)how to load the data in the source?

1894


what is the use of skid in reporting?

2030


Can you define merge?

747


What is datastage engine?

815


What is meta stage?

706


disign the complex job in u r project?(they are aksing only complex job design and then data flow...)

2171


How do you register plug-ins?

691


Name the third party tools that can be used in datastage?

715