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