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
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 |
Small correction Ramu, Instead of Transformer stage use Filter stage it will give performance gain.
| Is This Answer Correct ? | 0 Yes | 0 No |
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 |
Difference between in process and inter process?
In Datastage, how you can fix the truncated data error?
how to sort two columns in single job in datastage.
How many areas for files does datastage have?
I have a source like file it have Number of records and i want to load without first and last records in target?Datastage?
how to find no.of records in sequntial file itself?
Difference in the implementation of lookup and join stages,in joining two tables?
What is apt_config in datastage?
What is orabulk stage?
What is a datastage job?
Pls tell me what is troubleshooting in datastage view?
table a contains 5 columns and table b contains 5 columns how can i get 10 columns at target?