hara


{ City } hyderabad
< Country > india
* Profession * sse
User No # 81000
Total Questions Posted # 0
Total Answers Posted # 3

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 20
Users Marked my Answers as Wrong # 22
Questions / { hara }
Questions Answers Category Views Company eMail




Answers / { hara }

Question { 6515 }

I am having the 2 source files A and B and I want to get the
output as, the data which is in file A and which doesn't in
file B to a target 1 and which is in file B and which doesn't
in file A to a target 2?


Answer

mapping for above job

fileA---->joinstage---->transformer------->dataset1
^ ------>dataset2
|
|
fileB


go to joinstage ,take type of join is fullouter join,

then copy the i/p column to o/p link ,goto transformer stage
u 'll found 2 constraint tab ,in 1st constraint tab write
leftRec_column<>rightRec_column And LeftRec_column<>0,

similarly in 2nd constraint tab write
leftRec_column<>rightRec_column And RIGHTRec_column<>0

then copy only LeftRec_column to dataset1
and copy only RightRec_column to dataset2


i think u definitly get the correct answer

Is This Answer Correct ?    9 Yes 1 No

Question { 8604 }

Source flat file contains
src
---
1
2
'
'
'
18
we had 3 targets
T1 T2 T3
-- -- --
1 4 7
2 5 8
3 6 9
10 13 16
11 14 17
12 15 18

How can i get?
**Using only datastage, but not unix or any other.
I am expecting the answer soon..
Thanks in advance.


Answer

source-->transformersatage--->dataset1
---->dataset2
----->dataset3
double click on transformerstage,copy the input to output link
i.e(dataset1,dataset2,dataset3),then go to constraint part of the transformer stage ,we will find three constraint tabs,

in 1st constraints tabs write down--> column=1orcolumn=2orcolumn=3orcolumn=10orcolumn=11orcolumn=12
then go to 2nd constraints tabs --->write similarly
column=4orcolumn=5orcolumn=6orcolumn=13orcolumn=14orcolumn=15
,then go to 3rd constraints tab and click on otherwise/Log

go to dataset1,click on partitioning tab,select partition type:=hash,then click on check box(i.e perform sort)..
similarly ,go to dataset2,dataset3,and mention all the above technic...

i hope u got solun......

Is This Answer Correct ?    8 Yes 3 No


Question { HSBC, 23152 }

How to delete the data in dataset?types of deleting the data
in dataset?


Answer

suppose we have one file HSBC.ds ,having 5 fields or
columns,and
20 records,for deleting the all record
then

>$head -1 HSBC.ds > NEW_HSBC.ds
then rename the new file use mv command ,like this mannaer
>$mv NEW_HSBC.ds HSBC.ds




Is This Answer Correct ?    3 Yes 18 No