Created 03-20-2018 04:30 PM
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
Created 03-20-2018 06:57 PM
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
Created 03-21-2018 10:04 AM
@Jordan Moore Thanks it worked
Created 11-15-2019 03:49 AM
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 .
Thanks,
Mahesh
Created 03-20-2018 08:02 PM
Why don't you use "beeline"!!
cuz I don't think hdfs can know notice the difference between external table and no external table!