cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

What's the difference between coalesce() and repartition()?

Kaniz
Community Manager
Community Manager
1 REPLY 1

Ryan_Chynoweth
Honored Contributor III

Repartition triggers a full shuffle of data and distributes the data evenly over the number of partitions and can be used to increase and decrease the partition count. Coalesce is typically used for reducing the number of partitions and does not require a shuffle. According to the inline documentation of coalesce you can use coalesce to increase the number of partitions but you must set the shuffle argument to true. Please note that unlike repartition, coalesce does not guarantee equal partitions.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.