Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

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


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


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 -

Or if you cannot connect to the metastore, you will need to scan over Hive tables -


@Jordan Moore Thanks it worked

New Contributor

Hello @JordanMoore @shashankvc @sihi_yassine ,


As per your requirement you want list of all external hive tables along with HDFS path location.

Database name,Table name,Table Type(External) and HDFS Location of hive External tables.

First login to Hive metastore and use the database which is storing all hive metadata 

Use 3 tables TBLS,DBS and SDS tables , on top of this 3 tables we can apply joins on DB_ID and SD_ID

For more information and query output please check below link .




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!

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.