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

Answers were Sorted based on User's Feedback



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 10..

Answer / vaibhav

I think, here the question is... if F1 & F2 both are 'N' then the records with same I_D should be dropped.. correct Prasad?

if this is the case we need to find ans for this scenario..

Is This Answer Correct ?    1 Yes 0 No

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 10..

Answer / bharath

Hi friend..
question may not clear..
my question is..
in what based on I_D s 100,103,105 don't want to send to
target?

Out of my knowledge
1.change the Field names as new field names by using modify stage as follows
Give at specification as
'ID = I_D; flag1=F1; flag2;'
2.Give the field delimiter=tab
and final delimiter=end

then u get

clear my question?
thank you..

Is This Answer Correct ?    0 Yes 0 No

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 10..

Answer / 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

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 10..

Answer / bharath

Hi,
please find the below answer.

|------seq1
src---->trans-----
|------seq2


in transformer stage give constraint as follows

src.f1="N" And src.f2="N"

check other wise link on seq2link.

then you get..

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Data Stage Interview Questions

input like 2 7 8 9 5 1 7 3 6 output:2 5 6 how to find out this plz explain?

2 Answers   HSBC,


if the source file is CID,CCODE,CONNDATE,CREATEDBY 0000000224,1000,20060601,CURA 0000000224,2000,20050517,AFGA 0000000224,3000,20080601,TUNE 0000000225,1000,20020601,CURA 0000000225,2000,20050617,AFGA 0000000225,3000,20080601,TONE AND TARGET is oracle following are the validations cid loaded with unique records leading zeors has to be deleted while loading cid in target load only customer who got early connected to company conn_date should be loaded into oracle date format cid datatype is varchar2 in target conn_date is data datatype ccode is varchar2 0000000224,1000,20060601,CURA 0000000224,1000,20060601,CURA

2 Answers  


Explain how a source file is populated?

0 Answers  


which memory is used by lookup and join

5 Answers   IBM,


My input has a unique column-id with the values 10,20,30.....how can i get first record in one o/p file,last record in another o/p file and rest of the records in 3rd o/p file?

2 Answers   Wipro,






my source seq file have col1 1 2 3 4 5 6 7 8 9 i have 4 targets t1 t2 t3 t4 1 2 3 4 5 6 7 8 9 like this how we can get?

10 Answers   Polaris,


How you Remove the Dataset in Unix?

5 Answers  


what is parameterset?

4 Answers   Wipro,


Explain briefly scd type2 in datastage7.5x2(parallel)

1 Answers   IBM,


what is set mapping in datastage??

2 Answers   ADP,


What is quality stage?

0 Answers  


j1,j2,j3 jobs r runing iwant to run j1,j3 after j2 how to do this using sequencer? 2)j1,j2,j3 jobs r runing iwant to run j1,j2,j3 how to do this?

1 Answers   Wipro,


Categories