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.
Known 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.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp