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 to create a file using vi editor? 2)how to delete a file in vi editor? 3)How to connect the server datastage to unix? what r the command lines we r using? 4)30 jobs r runnig in unix i want to find out my job. how to do this? give me command?

0 Answers   Wipro,


how do u capture duplicates through sort & transformer

4 Answers  


What can we do with datastage director?

0 Answers  


hi iam new to this tooliam cmpltied to know abt datastage so now iam in project tell me whole step by step what iam doing iwnt to go with exp so plz hlp me pals

0 Answers  


Differentiate between hash file and sequential file?

0 Answers  






What is Horizontal transformation, vertical transformation,diagonal transformation?

2 Answers   Cap Gemini,


Is there no issue when you try to convert a NOt null column in nullable and vice versa in aggregator styage and transformer stage? When I tried i got the warnings but in a running code I can see such type of scenarios. Please explain

2 Answers  


i have a scenario in which i/p columns areID,salary with 1,1000 2,2000 and 3,3000 i need an extra column in the o/p named avg(salary)how can i get it?

4 Answers   L&T,


What are the some differences between 7.x and 8.x version of datastage?

0 Answers  


how can we extract data with out having any common column

7 Answers   IBM, Switch2iTech,


what is the difference between lookup stage reject link and merge stage reject link in datastage Parallel jobs? interm of output in Merge Reject link and Look Up Reject link ?

4 Answers   HCL,


CAN ANY ONE TELL ME THE ARCHITECTURE OF DATASTAGE CLEARLY....

2 Answers   Wipro,


Categories