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
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
@Jordan Moore Thanks it worked
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 .
@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!