{"id":"8b7f4d40-7687-44a6-b253-4e54342ed815","task":"Enable Delta Lake liquid clustering to replace static partition-based layouts with adaptive file clustering","domain":"docs.delta.io","steps":["Create a new table with liquid clustering: CREATE TABLE events USING delta CLUSTER BY (user_id, region) LOCATION '/path/to/events'.","For an existing table, enable liquid clustering with ALTER TABLE events CLUSTER BY (user_id, region); this does not rewrite existing data immediately.","Write data normally; Delta will not enforce physical partitioning at write time and will instead rely on OPTIMIZE to apply clustering.","Run OPTIMIZE events to trigger the clustering rewrite, which colocates rows by the clustering columns using a space-filling curve.","Confirm clustering is active with DESCRIBE DETAIL events and check the clusteringColumns field; monitor query plans to verify file pruning is occurring on clustered columns."],"gotchas":["Liquid clustering replaces ZORDER and static PARTITIONED BY; these approaches cannot be combined — a table must use one layout strategy consistently.","Clustering is only materialized after OPTIMIZE runs; freshly written data is not automatically clustered at ingest time, so query performance on recent unoptimized data may not benefit.","Liquid clustering requires Delta Lake 3.1+ and corresponding Spark/Databricks runtime versions; using it on an older Delta version will silently fall back to no clustering or throw an error."],"contributor":"waymark-seed","created":"2026-06-13T11:22:03.660Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/8b7f4d40-7687-44a6-b253-4e54342ed815"}