i have data like
sam
ram
sam
raj
ram

I want two targets
trgt1
ram
sam

trgt2

raj
how can i do this in datastage?

Answers were Sorted based on User's Feedback



i have data like sam ram sam raj ram I want two targets trgt1 ram sam trgt2 raj ho..

Answer / ramu

src.....>agg........>t/r..........2trgs
take src as seqfiles and take aggregater stage is for
calculate count of records based on name coloumn,next take
the transformer is for apply constraints like cnt=1 then go
for trg1

Is This Answer Correct ?    7 Yes 0 No

i have data like sam ram sam raj ram I want two targets trgt1 ram sam trgt2 raj ho..

Answer / subhash

1) If SRC is either Oracle or Seq File

SRC--->AGG---->fILTER---->TGT1
...................|
...................|
..................TGT2

the main data is:
sam
ram
sam
raj
ram
from aggregator stage, the output is:
sam,2
ram,2
raj,1

Then specify the count<>1 in the Filter for TGT1 then you get:
ram
sam

in another link for TGT2, give count=1. THEN YOU GET:
raj

2) If SRC is DataBase,

Orcl Conector----->Filter---->TGT1
.......................|
.......................|
......................TGT2

SELECT NAME, COUNT(NAME)
FROM EABLE_NAME
GROUP BY (NAME)
from the Above Query, the output is:
sam,2
ram,2
raj,1

Then specify the count<>1 in the Filter for TGT1 then you get:
ram
sam

in another link for TGT2, give count=1. THEN YOU GET:
raj

Is This Answer Correct ?    6 Yes 1 No

i have data like sam ram sam raj ram I want two targets trgt1 ram sam trgt2 raj ho..

Answer / reddymkl.dwh

Small correction Ramu, Instead of Transformer stage use Filter stage it will give performance gain.

Is This Answer Correct ?    0 Yes 0 No

i have data like sam ram sam raj ram I want two targets trgt1 ram sam trgt2 raj ho..

Answer / cva

take seqfile for loading src then take filter stage and take
two outputs from filter . write condition in filter stage
use where clause=col like 'sam' and col like 'ram' for one
trg and for second also like that.

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More Data Stage Interview Questions

how do u reduce warnings

1 Answers   CGI,


What is the difference between lookup and sparse lookup?

1 Answers  


Can you highlight the main features of ibm infosphere information server?

0 Answers  


if i have two tables table1 table2 1a 1a,b,c,d 1b 2a,b,c,d,e 1c 1d 2a 2b 2c 2d 2e how can i get data as same as in tables?chandu how can i implement scd typ1 and type2 in both server and in parallel?chandu field1 field2 field3 suresh , 10,324 , 355 , 1234 ram , 23,456 , 450 , 456 balu ,40,346,23 , 275, 5678 how to remove the ,inthe fields?

2 Answers  


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

4 Answers  






How to RD using transformer?

0 Answers   CTS,


how to validate the jobs

2 Answers   IBM,


Why we need datasets ratherthan sequential files?

5 Answers  


what is a message handler

3 Answers   IBM,


How can one find bugs in job sequence?

0 Answers  


hi, 1)totally how many jobs created in ur project 2)what is ur datamart size & Dwh size 3)How secure ur project 4)could u plz tell be about testing process after complete the job will run sucessfully or not in Datastage

1 Answers   Wipro,


how can we perform the 2nd time extraction of client database without accepting the data which is already loaded in first time extraction

1 Answers   Reliance,


Categories