Liquid Clustering with Partitioning

Devsh_on_point
New Contributor

Hi Team,

Can we use Partitioning and Liquid Clustering in Conjunction? Essentially, partitioning the table first on a specific field and then apply liquid clustering (on other fields)?

Alternatively, can we define the order priority of the cluster key columns? As I understand, the order of the keys in Cluster By command does not matter. Will this change? 

szymon_dybczak
Esteemed Contributor III

Hi @Devsh_on_point ,

No, you cant have partitioning and liquid clustering on a table. You can treat liquid clustering as a more performant replacement of partitioning.

And yes, you are correct. Order of cluster columns doesn't matter:

"Databricks recommends choosing clustering keys based on commonly used query filters. Clustering keys can be defined in any order."

 

jeffrey-gong
Databricks Employee
Databricks Employee

Hi @Devsh_on_point, we are in Private Preview for a feature that helps you convert a Partitioned table to Liquid Clustering. Here is the User Guide. Reach out to your account team to get enrolled!