Page 1 of 1

Merge stage with NULL output

Posted: Mon Aug 16, 2010 4:09 pm
by lkganta
Hi,
I have tried to use Merge stage as follows, but the output is coming as NULLs for
other selected merge columns. ( I have Sort asc before the Merge stage)

Input 1

C1 C2 C3
--------------
1 a 10
2 b 20

Input 2

C1 C2 C4
-------------
1 a 100
2 b 200



Input 3

C1 C2 C5
--------------
1 a 1000
2 b 2000


Output- Present

C1 C2 C3 C4 C5
------------------------------------
1 a 10 NULL NULL
2 b 20 NULL NULL

Expected is

C1 C2 C3 C4 C5
------------------------------------
1 a 10 100 1000
2 b 20 200 2000


Could you please help me on getting this with help of Merge stage?

Thank you
lkganta

Posted: Tue Aug 17, 2010 1:44 am
by srinivas.g
I have tried it is giving desired output. Pleae dont use sort stage.if you see merge stage itself we have sort option.please use that...

Posted: Tue Aug 17, 2010 2:59 am
by ray.wurlod
srinivas.g wrote:Pleae dont use sort stage.if you see merge stage itself we have sort option.please use that...
What reason can you give for that advice?

Posted: Tue Aug 17, 2010 3:30 am
by srinivas.g
Sorry ....... if you use sort stage also will get expected output.

Posted: Tue Aug 17, 2010 4:12 am
by kris007
Were you able to verify the data in Input 3 and Input 4 to make sure the records with key values 1, a and 2, b are present? Have you hash partitioned the data before sorting?