0

I have set of databases in hive, some of the tables are Managed and some are External tables. Now, i want to know list of tables which are located in same path.

For example for different databases A, B and C, External tables for A are stored at /x/y/a Some tables for B are stored at /x/y/b, /x/y/d External tables for C are stored at /x/y/c

It is possible with some hive query or properties? Please help.

Thanks

RAVITEJA SATYAVADA
  • 2,503
  • 23
  • 56
  • 88
  • If you want to use only hive query, I think that this [link](http://stackoverflow.com/questions/13178182/i-have-created-a-table-in-hive-i-would-like-to-know-which-directory-my-table-is) would help. – laurentgir Apr 16 '15 at 13:54

1 Answers1

0

You can get the list of tables stored in HADOOP filesystem by using command : hdfs dfs -ls /user/hive/warehouse/**<DB_name>**.db/

This will give list of Managed tables.

Ajith Sasidharan
  • 1,155
  • 7
  • 7