โ10-22-2025 05:00 AM
Let's say a table is configured to have automatic liquid clustering:
ALTER TABLE table1 CLUSTER BY AUTO;How to know which columns were chosen by Databricks?
โ10-22-2025 05:06 AM
Hi @smoortema ,
You can use DESCRIBE TABLE or SHOW TBLPROPERTIES. If automatic liquid clustering is enabled, the clusterByAuto property is set to true. The clusteringColumns property shows the current clustering columns that were automatically or manually selected.
โ10-22-2025 05:06 AM
Hi @smoortema ,
You can use DESCRIBE TABLE or SHOW TBLPROPERTIES. If automatic liquid clustering is enabled, the clusterByAuto property is set to true. The clusteringColumns property shows the current clustering columns that were automatically or manually selected.
โ10-22-2025 05:15 AM
Is there a way to set up automatic clustering by giving it a hint to use certain columns until Databricks has enough history to choose one?
โ10-22-2025 05:17 AM
Unfortunately there is no option for doing that currently. But it seems like a really good idea for a product team to consider ๐
โ10-22-2025 05:44 AM - edited โ10-22-2025 05:46 AM
From the documentation, it seems that in Python, there is such an option, only when creating or replacing a table.
# To set clustering columns and auto, which serves as a way to give a hint
# for the initial selection.
df.writeTo(...).using("delta")
.clusterBy("clusteringColumn1", "clusteringColumn2")
.option(โclusterByAutoโ, โtrueโ)
.create()
โ10-22-2025 06:20 AM
Thanks for letting me know. I wasn't aware of that ๐
Passionate about hosting events and connecting people? Help us grow a vibrant local communityโsign up today to get started!
Sign Up Now