Retrive inforrmation about table clustering from information_schema

Mike_Szklarczyk
Contributor

Hi guys,

I wonder if and when it will be possible to extract from information_schema how the table is clustered. I know that analogous information can be obtained when a table is partitioned using this query:

 

SELECT * FROM cdl_dev.information_schema.columns 
WHERE partition_index is not null

 

 Does anyone have information on whether this will be possible?

NandiniN
Databricks Employee
Databricks Employee

Iit is not possible to extract clustering information of a table directly from the information_schema . The information_schema.columns table can provide details about partitioning, but similar information for clustering is not available through the information_schema.

If you need clustering information, you might need to use other methods or tools provided by Databricks, such as examining the table properties or using Databricks-specific APIs.

However, I hear your requirement and it just sounds fair and I would encourage you to add a feature request here https://docs.databricks.com/en/resources/ideas.html#ideas 

View solution in original post