wht is collating Sequence Map in Sort Stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Prashantoncyber
Participant
Posts: 108
Joined: Wed Jul 28, 2004 7:15 am

wht is collating Sequence Map in Sort Stage

Post by Prashantoncyber »

Hi All

I am exploring the functionalities of Sort.

In Sort -> Stage -> Properties ->

Can any body explain the What is Collating Sequence maps thro any example?

AS its not clear thro' help material.

Thanks

Prashant
Last edited by Prashantoncyber on Tue Aug 17, 2004 12:11 am, edited 1 time in total.
bibhudc
Charter Member
Charter Member
Posts: 20
Joined: Thu Jun 19, 2003 12:26 pm

Re: Need Details of Patition key in Link Partitioner Stage

Post by bibhudc »

lets say you have source records with 2 columns - a number datatype called "customer_key" & a varchar column called "name".

Modulus -- lets say you want 7 partitions. which partition the record will fall into will depend on the result of mod (customer_key, 7) .. i.e.
partition number = remainder of customer_key/7
This method is similar to hash by field, but involves simpler computation.

In Hash, a more complex algorithm may be used e.g. partition number = some constant * (customer_key /9 + sum(ascii value of all chars of name) /29)

Hash by field is useful for ensuring that related records are in the same partition...sometimes when relationship is not too apparent, you want to use the hash partition. It does not necessarily result in an even distribution of data between partitions.

Bibhu
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Post by Amos.Rosmarin »

Hi,


Round-robin will give you an even distribution.
Random will give you an even distribution as well but the distribution will not be deterministic.
Hash - the distribution will not be even but equal keys will be placed under the same partition.
Modulus will do the same as hash for numeric keys.


HTH,
Amos
Prashantoncyber
Participant
Posts: 108
Joined: Wed Jul 28, 2004 7:15 am

Post by Prashantoncyber »

Thanks Amos and Bhibhu for giving insight into the matter.

Regards
Prashant
Amos.Rosmarin wrote:Hi,


Round-robin will give you an even distribution.
Random will give you an even distribution as well but the distribution will not be deterministic.
Hash - the distribution will not be even but equal keys will be placed under the same partition.
Modulus will do the same as hash for numeric keys.


HTH,
Amos
Post Reply