Search This Blog

May 28, 2016

Hive: How to view different objects present in Hive Metastore

How to view the databases present in Hive Metastore?

Execute the following command at Hive prompt

         SHOW DATABASES;

How to change / use different database?

Execute the following command at Hive prompt. Replace the <<Database_Name>> with actual database name.

       USE <<Database_Name>>;
 
       USE default;

How to view the tables present in a database?

Execute the following command at Hive prompt

       SHOW TABLES;

No comments: