I'm trying to obtain the basic information and the storage location of the delta table, but without success.
Is there a way to get: storage location, type, catalog, schema, table name using SQL Editor through a query?
I can get the basic information (catalog, schema, table name) through the information_schema.tables table, but I couldn't find the rest (storage location, type).
I did a search and the AI-ChatGPT suggested the query below but it's not working.
SELECT
t.table_catalog, t.table_schema, t.table_name, t.table_type,
detail.sizeInBytes, detail.location, detail.format
FROM
information_schema.tables t,
LATERAL (DESCRIBE DETAIL delta.`${t.table_catalog}.${t.table_schema}.${t.table_name}`) detail
WHERE
t.table_type = 'EXTERNAL' AND detail.format = 'delta'
Thank you very much if anyone can help