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.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now