Apache Hive Usage Example - How to Check the Current Hive Database
To know which Hive database you are currently using, Use the following command:
|
1 |
set hive.cli.print.current.db=true |
then the prompt will display Hive(DB_name)
Another Method is to edit hive-site.xml by pasting this code:
|
1 2 3 4 |
<property> <name>hive.cli.print.current.db</name> <value>true</value> </property> |
In second scenario, you can automatically display the Hive dabatabase name when you open terminal.











