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

how to partition my Delta table?

jose_gonzalez
Moderator
Moderator

I would like to follow best practices to partition my Delta table. Should I partition by unique ID or date?

2 REPLIES 2

User16783854357
New Contributor III

Partitioning depends on the use cases associated with reading and writing data in the table. If the reads and writes are done for a limited set of dates , having the date as a partition would help speed up processing the operations.

RonanStokes_DB
New Contributor III
New Contributor III

Depending on the amount of data per partition - you may also want to consider partitioning by week, month or quarter.

The partitioning decision is often tied to the tiering model of data storage. For a Bronze ingest layer, the optimal partitioning is to partition by some time value so that all data for a particular ingest is in the same partition.

For serving data - such as provided by the Gold tier, the optimal partitioning strategy is to partition so that queries require retrieval of data from the fewest partitions.

Depending on your consumption patterns, this may be best achieved by partitioning by time, region or some other business criteria.

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.