Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to get all the External Hive table details from the HDFS paths?

How to get all the External Hive table details from the HDFS paths?

New Contributor

How to get the details of the Hive table from the HDFS path? I dont want to use "show create table", cuz I need to get the info from the HDFS path to the table and not from the table to the path

3 REPLIES 3

Re: How to get all the External Hive table details from the HDFS paths?

Super Collaborator

You will need to query the Hive metastore to

1. Filter on External tables

2. JOIN all tables (TBLS table) with all databases (DBS table)

3. Select the path

See here, for example - https://stackoverflow.com/questions/44151670/search-a-table-in-all-databases-in-hive

Or if you cannot connect to the metastore, you will need to scan over Hive tables - https://stackoverflow.com/questions/35004455/how-to-get-all-table-definitions-in-a-database-in-hive

Re: How to get all the External Hive table details from the HDFS paths?

New Contributor

@Jordan Moore Thanks it worked

Re: How to get all the External Hive table details from the HDFS paths?

Expert Contributor

@Shashank V C

Why don't you use "beeline"!!

cuz I don't think hdfs can know notice the difference between external table and no external table!