cancel
Showing results for 
Search instead for 
Did you mean: 
Technical Blog
Explore in-depth articles, tutorials, and insights on data analytics and machine learning in the Databricks Technical Blog. Stay updated on industry trends, best practices, and advanced techniques.
cancel
Showing results for 
Search instead for 
Did you mean: 
joe_widen
Databricks Employee
Databricks Employee

This blog talks about common ways in which Hive-style partitioning is used as a workaround for efficient data storage.

Liquid Clustering improves partitioning and zorder techniques by simplifying data layout decisions while optimizing query performance.  Liquid Clustering simplifies existing approaches by giving the user a flexible option that is more cost-effective and efficient when measured in a variety of different ways.  

 

The concepts behind the efficiency of Liquid Clustering 

Liquid Clustering does not rely on storing data in physical partitions. It stores the data by looking at the ranges and distribution of values in a dataset, then dynamically clusters data amongst the files that are written. This means, for example, that if you choose timestamp as a Liquid Clustering key, a range of dates can exist in a file.  

unnamed.png

Liquid Clustering stores this clustering metadata in the delta log so that when the next optimization happens, Liquid Clustering understands how existing data is stored.  When incorporating new data into Liquid clustered table, Liquid Clustering will rewrite the minimal amount of data required to efficiently cluster the new and existing data, in order to minimize write amplification and reduce the cost of maintenance.

 

Here are the top five ways that Liquid Cluster can solve problems from the Hive past.

1. Minimize Maintenance

Hive-style Partitioning: Table maintenance with Hive-style partitioning can be difficult and expensive. It often involves frequent data rewrites, complex partition management, and periodic compaction to ensure optimal performance.

Liquid Clustering: Liquid Clustering reduces the need for extensive maintenance by providing a flexible and adaptive data layout. This eliminates the need for frequent data rewrites (and minimal rewrite when necessary) and complex partition management, resulting in lower maintenance costs and more efficient operations.

2. Maximize Performance

Hive-style Partitioning: Partitioning requires rigid data boundaries, regardless of the amount of data that fits within those boundaries.  This makes choosing the correct initial data layout very important.  Designing tables to leverage partitions in queries is oftentimes difficult and very error prone, especially when working with high cardinality columns, which leads to poor performance.

Liquid Clustering: By optimizing the data layout using a continuous fractal space filling curve, Liquid Clustering significantly improves read performance. This results in faster query execution times, by up to 12x compared to traditional Hive-style partitioning.

3. Minimize Complexity

Hive-style Partitioning: Managing partitions in Hive can be complex and requires ongoing manual tuning. This includes tasks like adding new partitions, managing partition directories, and ensuring optimal data distribution.  This work is very menial and time consuming, but must be done for every table.

Liquid Clustering: Liquid Clustering simplifies data management by automatically adjusting the data layout based on the data. This self-tuning approach eliminates the need to think about physical storage of data.  Liquid partitioning is partnering with predictive optimization on Databricks to even automatically choose the best clustering columns for you.

4. Solve Data Skew

Hive-style Partitioning: Handling data skew is challenging with Hive-style partitioning. Skewed data can lead to uneven distribution of data across partitions, causing some partitions to become hotspots and others to be underutilized.  This leads to performance issues and can result in poor resource utilization.

Liquid Clustering: Liquid Clustering dynamically reduces data skew by continuously optimizing the data layout. This ensures a more balanced distribution of data, improving overall query performance and resource utilization.

5. Increase Flexibility

Hive-style Partitioning: Hive relies on fixed partition structures, which can be inflexible and difficult to adapt to changing data access patterns. This rigidity often necessitates costly data rewrites and reorganization.

Liquid Clustering: Liquid Clustering moves beyond fixed partition structures, offering a more fluid and adaptable data layout. Clustering keys can be redefined without rewriting existing data, allowing the data layout to evolve with changing data needs.

Give liquid clustering a try today!

Liquid clustering is incredibly easy to get started with.  Let liquid clustering remove the burden of partitions forever from your data estate.

https://docs.delta.io/latest/delta-clustering.html

1 Comment
Abser786
New Contributor II

you have mentioned target size in picture, what it refers. 

also does it resolve concurrentAppend Excecption