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
wht is collating Sequence Map in Sort Stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 108
- Joined: Wed Jul 28, 2004 7:15 am
wht is collating Sequence Map in Sort Stage
Last edited by Prashantoncyber on Tue Aug 17, 2004 12:11 am, edited 1 time in total.
Re: Need Details of Patition key in Link Partitioner Stage
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
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
-
- Premium Member
- Posts: 385
- Joined: Tue Oct 07, 2003 4:55 am
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
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
-
- Participant
- Posts: 108
- Joined: Wed Jul 28, 2004 7:15 am
Thanks Amos and Bhibhu for giving insight into the matter.
Regards
Prashant
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