Query remote hive metastore to get list of tables

652 views Asked by At

Hi Gurus,

I want to access remote hive metastore on mapr : Below are the conf parameters:

driver :"org.apache.hive.jdbc.HiveDriver"

database url : jdbc:hive2://Company.com:port number/

I am using hiveserver2 and dbvisualizer is the tool from where i fire queries . I want to access this remote hive metastore and be able to get date of creation of tables which are more than N days old . Please tell me how it can be done and the hive query for the same. I have a jdbc code which does the same ,but i would like to know if i can directly write a hive query to do the same.Does hcatalog provide a way to do this and if so how ?

1

There are 1 answers

0
WestCoastProjects On

You mentioned using jdbc code to obtain your specific query results. That is the correct way. Hive supports the following syntaxes, which are relatively simple/limited versus full fledged sql that you can do via jdbc:

  • show table extended like 'regex'

It is not possible to run a full fledged query with filtering and ordering as you had done in jdbc.