szymon_dybczak
Esteemed Contributor III

Since as you wrote, managed iceberg tables don'tt support partitions you need to use liquid clustering. To enable liquid clustering for managed iceberg table you can use SQL syntax.

To enable liquid clustering, add the CLUSTER BY phrase to a table creation statement, as in the examples below:

CREATE TABLE table1(col0 INT, col1 string) CLUSTER BY (col0);

 But keep in mind that for Apache Iceberg, you must explicitly disable deletion vectors and Row IDs when enabling Liquid Clustering on a managed Iceberg table.

To enable liquid clustering on existing table use following syntax:

-- Alter an existing table
ALTER TABLE <table_name>
CLUSTER BY (<clustering_columns>)

 

You can also try to use automatic liquid clustering for Unity Catalog managed Delta tables. In that case Databricks will try to intelligently choose clustering keys to optimize query performance

ALTER TABLE table1 CLUSTER BY AUTO;

 

Use liquid clustering for tables | Databricks on AWS