Merge stage with NULL output

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
lkganta
Participant
Posts: 21
Joined: Wed Feb 08, 2006 4:10 pm

Merge stage with NULL output

Post 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
srinivas.g
Participant
Posts: 251
Joined: Mon Jun 09, 2008 5:52 am

Post 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...
Srinu Gadipudi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
srinivas.g
Participant
Posts: 251
Joined: Mon Jun 09, 2008 5:52 am

Post by srinivas.g »

Sorry ....... if you use sort stage also will get expected output.
Srinu Gadipudi
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post 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?
Kris

Where's the "Any" key?-Homer Simpson
Post Reply