I have some Athena databases which contain a number of tables, and I know some of these tables use the Iceberg format. It’s important to me to know which are Iceberg tables, because those will allow a greater range of INSERT
, UPDATE
, and ALTER
queries that the basic EXTERNAL
table type.
When we create Iceberg tables in Athena we set the table_type
property like this:
CREATE TABLE my_table
-- specify columns, partition, location, etc
TBLPROPERTIES ('table_type' ='ICEBERG')
How can I check the value of this property from Athena when working with tables? If that’s not possible, what’s a suitable proxy for this so that I can determine whether a table is an Iceberg table (vs an External table)?
2
Answers
In Athena
DESCRIBE FORMATTED [TABLE]
(docs) is the only way to do it — neitherSHOW CREATE TABLE
norSHOW TBLPROPERTIES
work as of today.Can you python with boto3 library and pull table info. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glue/client/get_table.html
Have used this option as there’s metadata you can only get through the console or through api such as when a column is created etc.
Just another option to get additional info without going to the console