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 |
i have source data like empno,enmae 11 ,aa 12 ,bb i want output like empno,ename 11 ,aa 12 ,bb 11 ,aa 12 ,bb
if a column contains data like ram,rakesh,madhan,suraj,pradeep,bhaskar then I want to place names separated by commas in another columns how can we do?
I have a source table with column name CITY having 100 records, I want target table with column name start with 'A' and 'B',remaining columns as reject outputs. how can achieve this by data stage?please help me?????
what are fact tables and dimension tables? give example assuming one table.
In my project source data comes from MAINFRAME in files.so,This time data is coming as a binary file...I know for binary data we use Complex flat file stage..I have used it also..but on 'view data' data is not coming correctly..as it in MAINFRAME.give me some ideas..
I have scenario like this seq file --> transformer --> sort stage --> dataset In this job which prtitioning technique you are using and why???
what is the main difference between sorragate key n primary key in one word
can we see the data in fixed width file? how can u change the datatype of fixed width files?
Hi guys, In sequencer job, we have 3 sources, in that 1st source have some records, Here requirement is 1st source records are 100 then only run the job otherwise total job will abort... How to calculate this. please design the job. Thanks.
Differentiate between Join, Merge and Lookup stage?
what is the main differences between Lookup, Join and Merge stages?
how to get sum of sal based on dept_no and then sum of all sal irrespective of dept_no in same sql. output:- 10, 200(sum of sal for dept_no 10), 5000(sum of all sal)