source
1123445
I WANT OUTPUT AS
DUPLICATES TO TARGET1 LIKE
TARGET1
1144
NON-DUPLICATES TO TARGET2
TARGET2
235

Answers were Sorted based on User's Feedback



source 1123445 I WANT OUTPUT AS DUPLICATES TO TARGET1 LIKE TARGET1 1144 NON-DUPLICATES TO TAR..

Answer / siva

seq.file-->copy-->agg
! !secondary link
!.....>join-------->filter-->t1
primarylink !---->t2
agg:countrows
give condition in filter
count=1-->t1
count<>1-->t2

Is This Answer Correct ?    10 Yes 0 No

source 1123445 I WANT OUTPUT AS DUPLICATES TO TARGET1 LIKE TARGET1 1144 NON-DUPLICATES TO TAR..

Answer / subhash

Source
..|
..|
copy--->agg
..|.....|
..|.....|
join stage
....|
....|
Filter stage -----> target1
..|
..|
target2

the main data is:
1
1
2
3
4
4
5
from aggregator stage, the output is:
1,2
2,1
3,1
4,2
5,1

If you join these two links then the output will be:
1,2
1,2
2,1
3,1
4,2
4,2
5,1

Then specify the count<>1 in the Filter for target1 then you get the duplicate records. means YOU get:
1
1
4
4

in another link for target2, give count=1. means YOU get:
2
3
5

Is This Answer Correct ?    8 Yes 0 No

source 1123445 I WANT OUTPUT AS DUPLICATES TO TARGET1 LIKE TARGET1 1144 NON-DUPLICATES TO TAR..

Answer / s

agg-->filter-->trg2
^ |
| v
seq-->copy-->join-->trg1

agg:countrows
join:innerjoin
filter:count=1
:count>1

Is This Answer Correct ?    0 Yes 0 No

source 1123445 I WANT OUTPUT AS DUPLICATES TO TARGET1 LIKE TARGET1 1144 NON-DUPLICATES TO TAR..

Answer / chaint

source1(112345) ----- lookup stage- reference lookup
on(source2 output)--reject link(1144) --output(235)
source2(112345) -- sort( get count) -> filter(only unique)

we would require two source..
one original and other only (non repeated records)

we will have a lookup stage with source1 as input and
source2 as reference lookup..
in lookup stage we will have a reject link(1144) non matched
records.. and output will be(235).

Kindly correct me if i m wrong

Is This Answer Correct ?    0 Yes 2 No

source 1123445 I WANT OUTPUT AS DUPLICATES TO TARGET1 LIKE TARGET1 1144 NON-DUPLICATES TO TAR..

Answer / nagam

seq.file----->sort------>filter----2datasets

in sort stge create key change column and then filter stage
write the condition on based on keychange column keychange
column =1 uniq data keychange<>0 duplicate data we can get

If wrong please tell me

Is This Answer Correct ?    0 Yes 5 No

source 1123445 I WANT OUTPUT AS DUPLICATES TO TARGET1 LIKE TARGET1 1144 NON-DUPLICATES TO TAR..

Answer / shreeram

Seq(source)------> Transform stage-------> Tgt1
!.........>Tgt2


use substring in transform stage.

Is This Answer Correct ?    0 Yes 11 No

Post New Answer

More Data Stage Interview Questions

what is materialized view used datastage?

1 Answers   HSBC,


Hi Every one, I have a scenario plz suggest me 1)On daily we r getting some huge files data so all files metadata is same we have to load in to target table how we can load? 2) One column having 10 records at run time we have to send 5th and 6th record to target at run time how we can send? Hi plz help me for above scenarios and If any one is having JobSequence kindly send me one example and the scenario to my mail ID(nrvdwh@gmail.com)

3 Answers   HSBC,


tell me 5 situations when we r using oracle db stages like orecle connector, oracle enterprise

0 Answers   IBM,


Define APT_CONFIG in Datastage?

0 Answers  


What is the difference between hashfile and sequential file?

0 Answers  






How can you join flat file, oracle as a sources?

4 Answers   IBM,


i/p 1,a,1000 2,b,2000 3,c,3000 i want to get o/p as o/p 1,a,3000 2,b,4000 3,c,5000 how it can be done on using datastage?

5 Answers   HSBC,


i have a small question for datastage, After the desinging (i.e., transformations and loading)part, what we can do?

1 Answers   TCS,


What are the different database update actions available?

1 Answers   HP,


what is snow flack schema?

2 Answers  


Does datastage support slowly changing dimensions ?

0 Answers  


What are the types of views in datastage director?

0 Answers  


Categories