Join stage

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
lakshmEn@gmail.com
Participant
Posts: 7
Joined: Mon Oct 23, 2006 4:44 am

Join stage

Post by lakshmEn@gmail.com »

What I did:
I did a Right outer join on two input files using join stage in to a dataset.
I partitioned both inputs by "Hash" on key using inlink partition.

Observation:
When I sort on keys in Ascending order, the stage works fine.
When I sort on keys in Descending order, the stage doesn't give the expected result and also throws the following warning.

Warning:
Join: When checking operator: User inserted sort "Join.Left_Link_Sort" does not fulfill the sort requirements of the downstream operator "APT_JoinSubOperator in Join"

Question:
Is descending order not applicable to "Join" stage.
I tried and couldn't get a solution from Online manuals and a search on this Forum.

Thanks in advance,
Lakshman.
tagnihotri
Participant
Posts: 83
Joined: Sat Oct 28, 2006 6:25 am

Re: Join stage

Post by tagnihotri »

Have you sorted both the links in same order ?
Cheers,
BA
lakshmEn@gmail.com
Participant
Posts: 7
Joined: Mon Oct 23, 2006 4:44 am

Re: Join stage

Post by lakshmEn@gmail.com »

tagnihotri wrote:Have you sorted both the links in same order ?
Yep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There's no reason descending order should not work, provided that you really have specified partitioning and sorting exactly the same for both links, or Entire on the right input (which carries almost no penalty in an SMP environment).

What do you mean by "does not work"? Are the appropriate columns nullable, since they may receive NULL as the result of the outer join?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
lakshmEn@gmail.com
Participant
Posts: 7
Joined: Mon Oct 23, 2006 4:44 am

Post by lakshmEn@gmail.com »

ray.wurlod wrote:There's no reason descending order should not work, provided that you really have specified partitioning and sorting exactly the same for both links, or Entire on the right input (which carries almost ...
Thanks a lot. I checked again. I have specified partitioning and sorting exactly the same way. Also now i tried with "Entire" partition for the "Right" input, Still it doesn't.
lakshmEn@gmail.com
Participant
Posts: 7
Joined: Mon Oct 23, 2006 4:44 am

Post by lakshmEn@gmail.com »

Kindly update me if i need to give any further information to make this clear.
chandra
Participant
Posts: 88
Joined: Sun Apr 02, 2006 6:50 pm
Location: India

Re: Join stage

Post by chandra »

sorted in descending order + then joined ryt

check the join component sort options .it should work...
please let me know ..

lakshmEn@gmail.com wrote:What I did:
I did a Right outer join on two input files using join stage in to a dataset.
I partitioned both inputs by "Hash" on key using inlink partition.

Observation:
When I sort on keys in Ascending order, the stage works fine.
When I sort on keys in Descending order, the stage doesn't give the expected result and also throws the following warning.

Warning:
Join: When checking operator: User inserted sort "Join.Left_Link_Sort" does not fulfill the sort requirements of the downstream operator "APT_JoinSubOperator in Join"

Question:
Is descending order not applicable to "Join" stage.
I tried and couldn't get a solution from Online manuals and a search on this Forum.

Thanks in advance,
Lakshman.
chandra ,
Hyd
lakshmEn@gmail.com
Participant
Posts: 7
Joined: Mon Oct 23, 2006 4:44 am

Re: Join stage

Post by lakshmEn@gmail.com »

I introduced "Sort stage" before my "Join" stage.

Now my "Join" stage has no inlink sort. It just does "Auto" partition.

In the "Sort" stage, if I sort in ascending order, it works.
In the "Sort" stage, if I sort in descending order, it doesn't.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Have you provided a reproducible example to your support provider? If so, what feedback did you get?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
lakshmEn@gmail.com
Participant
Posts: 7
Joined: Mon Oct 23, 2006 4:44 am

Post by lakshmEn@gmail.com »

Now i introduced "Peek" stage like below to the job which actually was working wrong with sort order as descending.

Left_Input_file -> Sort stage -> Peek ->
Join -> Output
Right_Input_file -> Sort stage -> Peek ->

To my surprise, it ran fine and gave the expected result.

Now i removed the peek and still surprised to see that it works fine.

My Objective got resolved but doubt still remains. What could have happened by the mere introduction on "Peek"??? If any body can get a clue kindly update me.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

select * from users where clue > 0;

0 rows returned.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

ray.wurlod wrote:

Code: Select all

select * from users where clue > 0;

0 rows returned.
:lol: :lol: :lol:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
lakshmEn@gmail.com
Participant
Posts: 7
Joined: Mon Oct 23, 2006 4:44 am

Post by lakshmEn@gmail.com »

:D

Thanks everybody for the help.

Is there any thing i need to do to close this posting?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

There should be a resolve button at the top. Just press that to mark it resolved.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply