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

input Name Salay Sam 10 Sam 30 Sam 20 Ram 40 Ram 50 Output should be Name Salary Count Sam 10 3 Ram 40 2 get min salary and count of name . OutPut 2 Name Seq Sam 1 Sam 2 Sam 3 Ram 1 Ram 2

1 Answers   HCL,


Explain ibm infosphere information server and highlight its main features?

0 Answers  


In Informatica,for the table I can find coreesponding dependent mappings.Likewise can I find the dependent jobs with all the information by using the table name

0 Answers   TCS,


1.which index is follows the dimensions tables?why? 2.what is the use of trigger in job sequence? 3.what is the mean of optimization? 4.what is the job control?when we use it? what is difference bet batch and sequencer? 6.seq--->seq,seq--->copy--->seq which one is best and efficient?

1 Answers  


How do u call shellscript/Batch file from DS?

4 Answers   HP,


how to define satge variables in transformer stage

2 Answers  


How to Remove Duplicate using SQL?

0 Answers   CTS,


Differentiate between validated and Compiled in the Datastage?

0 Answers  


If you want to use the same piece of code in different jobs, how will you achieve it?

0 Answers  


i/p o/p1 o/p2 1 1 4 1 1 5 1 1 6 2 2 2 2 2 2 3 3 4 5 6 how to populates i/p rows into o/p1&o/p2 using datastage stages?and also the same scenario using sql?

8 Answers   IBM,


Notification Activity

0 Answers   CTS,


how to convert rows into columns

2 Answers   IBM,


Categories