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: 

Issue with Liquid Clustering on Partitioned Table in Databricks

Akshay_Petkar
Contributor III

 

I recently tried applying Liquid Clustering to a partitioned table in Databricks and encountered the following

error: [DELTA_ALTER_TABLE_CLUSTER_BY_ON_PARTITIONED_TABLE_NOT_ALLOWED] ALTER TABLE CLUSTER BY cannot be applied to a partitioned table.

I understand that Z-Ordering works fine on non-partitioned columns, and I have successfully used. 

However, I specifically want to use Liquid Clustering instead of Z-Ordering. Since ALTER TABLE <TABLE NAME> CLUSTER BY (COLUMNS) is not supported on partitioned tables, has anyone found a workaround or an alternative approach to achieve similar clustering benefits?

1 REPLY 1

koji_kawamura
Databricks Employee
Databricks Employee

Hi @Akshay_Petkar 

Since we cannot use Liquid Clustering with a partitioned table, the only way I can think of is migrating from partitioning to Liquid Clustering. The same partitioning key columns and the additional columns you wanted to add can be the clustering keys up to four keys.

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