- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Unable to create Hive external table after deleting underlying location files of the table.
- Labels:
-
Apache Hive
Created on
‎12-12-2019
02:17 PM
- last edited on
‎12-12-2019
04:11 PM
by
ask_bill_brooks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am unable to create external hive table after manually deleting underlying hdfs location files of the table.
when table desc is statement is issued, it gives the describe of the table, but when select is performed on the table, then we are getting table doesn't exists. So we issued drop statement.
After issuing drop statement, then we again tried to create the table, but we are getting table already exists. Do we need to manually do a delete from the hive metastore ? or is there any way to forcefully re-create the table ? Please let me know.
Created ‎12-12-2019 03:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess table is not getting dropped. Please run repair statement and the run select statement to retrive the data.
MSCK [REPAIR] TABLE table_name [ADD/DROP/SYNC PARTITIONS];
Created ‎12-12-2019 04:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We even ran the MSCK repair table, but still no luck. Any other options ?
Created ‎12-12-2019 10:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you try performing the "Validate hivemetastore schema " from Cloudera manager - > Hive service then
Let us know if you are able to create the same table.
