Hash partitioning

Hash partitioning distributes rows according to the hash of a key's value: rows with the same key end up in the same partition. It is the shuffle mechanism for aggregations and joins. It balances data well if keys are varied, poorly if one key dominates.

Example

df.repartition(200, 'id_client')

Related concepts

The whole glossary