DESC Statement in Apache Hive and Impala

Similar to many RDBMSs, DESC Statement displays information about a table, such as column names and data types. This can be used to see the database properties as well.

Syntax:
DESC DATABASE dbName
DESCRIBE [DATABASE] [FORMATTED|EXTENDED] object_name

Examples:
DESC DATABASE dbName;
DESC tableName;
DESCRIBE tableName;
DESCRIBE FORMATTED tableName;
DESCRIBE EXTENDED tableName;

The DESCRIBE FORMATTED variation displays additional information, in a format familiar to users of Apache Hive. The extra information includes low-level details such as whether the table is internal or external, when it was created, the file format, the location of the data in HDFS, whether the object is a table or a view, and (for views) the text of the query from the view definition.

I hope you found this post to be informative.
To receive notifications of new posts, please subscribe.

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