cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

how to partition my Delta table?

jose_gonzalez
Databricks Employee
Databricks Employee

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
Databricks Employee
Databricks Employee

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.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group