Page 1 of 1

wht is collating Sequence Map in Sort Stage

Posted: Sun Aug 15, 2004 10:13 am
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

Re: Need Details of Patition key in Link Partitioner Stage

Posted: Mon Aug 16, 2004 1:03 am
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

Posted: Mon Aug 16, 2004 1:06 am
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

Posted: Mon Aug 16, 2004 4:32 am
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