Describe table metadata feature

You can use certain Hive and Impala show and describe commands to get information about table metadata.

The following table lists SHOW and DESCRIBE commands supported by Hive and Impala.

Command Syntax Description SQL Engine Support
SHOW CREATE TABLE table_name Reveals the schema that created the table. Hive and Impala
SHOW PARTITIONS Returns the Iceberg partition spec, just the column information, not actual partitions or files. Impala

DESCRIBE [EXTENDED] table_name

The optional EXTENDED shows all the metadata for the table in Thrift serialized form, which is useful for debugging. Hive and Impala

DESCRIBE [FORMATTED] table_name

The optional FORMATTED shows the metadata in tabular format. Hive

DESCRIBE HISTORY table_name [BETWEEN timestamp1 AND timestamp2]

Optionally limits the output history to a period of time. Impala

Hive example

DESCRIBE t;

Hive output includes the following information:

col_name data_type comment
x int
y int
NULL NULL
# Partition Transform Information NULL NULL
# col_name transform_type NULL
y IDENTITY NULL