6) my sorce
d1
d2
d1
d2
d1
d3
d2
d1


my target

tartget
1 d1
2 d1
3 d1
4 d1


target2


1 d2
2 d2
3 d3

Target 3

1 d3
Can any body send me answer this is argent requierment

Answers were Sorted based on User's Feedback



6) my sorce d1 d2 d1 d2 d1 d3 d2 d1 my targ..

Answer / subhash

1. SRC--->FILTER---->TGT1,TGT2,TGT3
In source query,
SELECT COL1,
RANK() OVER(PARTITION BY COL1 ORDER BY COL1) SNO
FROM TABLE
in filter,
col1='d1'------>TGT1
col1='d2'------>TGT2
col1='d3'------>TGT3

2. SRC---->TFM---->TGT1,TGT2,TGT3
in TFM, do the HASH partitioning on col1 and use the stage
varibles as below:
if col1 =prevCol then SV1=S1+1
else SV1=1
prevCol---->col1

In the link constraints:
TGT1 link, COL1='d1'
map SV1, COL1 to the tgt.

TGT2 link, COL1='d2'
map SV1, COL1 to the tgt.

TGT3 link, COL1='d3'
map SV1, COL1 to the tgt.

Is This Answer Correct ?    11 Yes 0 No

6) my sorce d1 d2 d1 d2 d1 d3 d2 d1 my targ..

Answer / ankit gosain

Hi,

The solution to the problem can be achieved by the below
job structure & settings:

Source---->SortStage---->Transformer---->Tgt1,Tgt2,Tgt3

1. In Sort Stage, sort in assending mode w.r.t. source
column (say col1) & Create a change key column (say
ChangeKey).
2. In Transformer stage, create a stage variable (say
count) & it's derivation would be:
if ChangeKey=1 then 1 else count+1
3. Constraint for Tgt1 => col1=d1
Constraint for Tgt2 => col1=d2
select otherwise constraint for Tgt3.

Cheers,
Ankit :)

Is This Answer Correct ?    6 Yes 1 No

6) my sorce d1 d2 d1 d2 d1 d3 d2 d1 my targ..

Answer / srinivas

Hii guys use following stages to get output
sequecial file->copy->aggregator and Joinstage then use filter to get required output
by using copy stage take two links one for aggregator and other for Join then you will get
required output

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Data Stage Interview Questions

what is data mapping

2 Answers  


how to retrive the max(sal),deptno,empno in datastage?

13 Answers   Polaris,


source file having the data like aabbccc, i want target file result like a1a2b1b2c1c2c3.

2 Answers  


i have 4 jobs i want run 1job should run on 1node and 2job runon 2node and.... how to make it possible?

1 Answers  


What is container and then types?

1 Answers  






how can you generate sequence number using only the sequential file stage?

3 Answers   TIAA CREF,


What is PX?

2 Answers   IBM,


Please tell me What is difference between 8.0 and 8.1

1 Answers   IBM,


Question 4) source target c1 c1 c2 c3 c2 c4 c4 c5 c3 c6 c7 c4 c5 c6 c7 Singal Source and Singal Target only subash,

3 Answers   TCS,


What is the purpose of pivot stage?

0 Answers  


What is a range lookup?

2 Answers   IBM,


How can we read latest records in a text file named file1.txt using seq file stage only? file1 having 100 records in that 5 record sare latest records.How can we read that latest records?

3 Answers   Caterpillar,


Categories