Two Very Useful Hive CLI settings

It is very helpful to set these in your .hiverc file. The hive cli reads from the .hiverc file in your home directory to override defaults.

Two of the settings I find very important is

set hive.cli.print.header=true;
set hive.cli.print.current.db=true;

The first line prints column headers when you do a select * from table. The second line prints the current database in the prompt. Both very very helpful features which I think should be turned on by default. Oh well.

Beware any changes in your .hiverc file will also affect the output of hive -e and hive -f commands. So if you have scripts that dump hive tables using any of the above methods the headers will be printed in the output.

 
32
Kudos
 
32
Kudos

Now read this

Removing Database Level Locks in HIVE

Recently we started noticing “CREATE TABLE” taking incredibly long amounts of time to execute and after which they’d fail. A more detailed look in to the issue revealed that we had upgraded HIVE and the new version, which now allowed... Continue →