'hive, how to use "extended" and "formatted" when describing table?

When typing

describe extended table_name, 

the output is massed up. So is there a way to show these infomation elegently?



Solution 1:[1]

show elegantly is something depends on your requirement. Both of your commands will show same result but differently.
describe extended - This will show table columns, data types, and other details of the table. Other details will be displayed in single line.
describe formatted - This will show table columns, data types, and other details of the table. Other details will be displayed into multiple lines.

You can also use describe table to just get column names and data types.

EDIT : The partition info in formatter option is displayed in the data in a hierarchical manner. You can look into the attached screenshot. In the example, source system is used a partition so you can see it is shown along with data type.
Partition info

In describe extended option, same parameters are put into single line so you can see it there.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1