...
Table of Content Zone | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||
Describe Database
DESCRIBE DATABASE shows the name of the database, its comment (if one has been set), and its root location on the filesystem. Describe Table/View/Column
DESCRIBE shows the list of columns including partition columns for the given table. If the EXTENDED keyword is specified then it will show all the metadata for the table in Thrift serialized form. This is generally only useful for debugging and not for general use. If the FORMATTED keyword is specified, then it will show the metadata in a tabular format. Note: DESCRIBE EXTENDED shows the number of rows only if statistics have been gathered for the table. Statistics are gathered automatically while data is loaded if the hive.stats.autogather configuration property has its default value of 'true' (see Newly Created Tables). Otherwise, ANALYZE TABLE can gather statistics after the data has been loaded (see Existing Tables). If a table has a complex column then you can examine the attributes of this column by specifying table_name.complex_col_name (and '$elem$' for array element, '$key$' for map key, and '$value$' for map value). You can specify this recursively to explore the complex column type. For a view, DESCRIBE EXTENDED or FORMATTED can be used to retrieve the view's definition. Two relevant attributes are provided: both the original view definition as specified by the user, and an expanded definition used internally by Hive. Describe Partition
This statement lists metadata for a given partition. The output is similar to that of DESCRIBE table_name. Presently, the column information associated with a particular partition is not used while preparing plans. Example:
|
...