Is it possible to get total number of hive tables? If its yes, please suggest me how to do.
use the following to compute the total # of tables you have in Hive.
hive -e "show databases" >db3.out;cat db3.out | while read line; do hive -e "use $line;show tables" >> tables3.out;done; cat tables3.out | wc -l
Approach is good but it also captures unwanted characters like "+------------+" and etc. and after manual cleaning of unwanted symbols from db3.out it also counts the unwanted lines from tables3.out.
you can use the below sql statement in the metastore database.
mysql -u root -e "use hive;SELECT NAME, TBL_NAME FROM DBS as a, TBLS as b where a.DB_ID=b.DB_ID;"> tables.txt
tables.txt will have the list of all tables.