Hive – Extended Properties

In this article, you will learn how to list out the properties of a database or a table in Hive.

DATABASE LEVEL:

DESCRIBE DATABASE db_name;
DESCRIBE SCHEMA db_name;
Database or schema both are the same thing. These words can be used interchangeably.

DESCRIBE DATABASE EXTENDED db_name;
Use the above command to list all the database properties attached to a particular database in Hive.
 

TABLE LEVEL:

DESC TableName
DESCRIBE TableName
Use the above command to get the schema of the table.

DESC EXTENDED TableName
Use the above command to get detailed information about the table that includes comments, last modified date, etc along with the table’s definition.

DESC FORMATTED TableName
Use the above command to get the summary, details, and formatted information about the specified table.

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s