SORT STAGE BEFORE 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
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

SORT STAGE BEFORE JOIN STAGE

Post by G SHIVARANJANI »

Hi,


Is it necessary to put a sort stage before join stage,

If i am not wrong Join stage does sorting as well.

please correct me if i am wrong

thanks,
Shivaranjani
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

It is better to use external Sort stage to sort both the left and right link data. It improves the performance especially if the data volume is high. The sorting performance is not good in Join stage.
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Post by G SHIVARANJANI »

But it gives a warning of

STG_JOIN_6: When checking operator: User inserted sort "STG_SORT_5" does not fulfill the sort requirements of the downstream operator "APT_JoinSubOperator in STG_JOIN_6"


Maveric wrote:It is better to use external Sort stage to sort both the left and right link data. It improves the performance especially if the data volume is high. The sorting performance is not good in Join stage.
Shivaranjani
madhukar
Participant
Posts: 86
Joined: Fri May 20, 2005 4:05 pm

Post by madhukar »

Check the sort keys and the join keys...it should be same
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

The sort and join keys should be the same and in the same order. If it still gives the warning, then try with APT_DISABLE_SORT environment variable. This might remove the warning. Might. Try it and let us know.
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Post by G SHIVARANJANI »

The keys are same but not working its giving the same warning..

Whats "APT_DISABLE_SORT environment variable" how can i use this.. :?:

Maveric wrote:The sort and join keys should be the same and in the same order. If it still gives the warning, then try with APT_DISABLE_SORT environment variable. This might remove the warning. Might. Try it and let us know.
Shivaranjani
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

The input needs to be hash-partitioned and sorted for Join . Same partition can be maintained after doing the same.

Alternatively "Auto" partition does the same.
APT_NO_SORT_INSERTION : DataStage automatically inserts sort components based on this , can be included in Job to prevent automatic sort insertions.
prashkvrk
Participant
Posts: 15
Joined: Tue Nov 21, 2006 1:17 am
Location: Bangalore,India

Post by prashkvrk »

to remove that warning, jus try this one.
In the stage prior to the external sort stage clear the partition. Probably the you would have given as default. Since the data is again repartioned you have to clear the partition.
I think this would remove the warning which you are getting !

Prasad
Post Reply