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.

Error: Error while compiling statement: FAILED: SemanticException Unable to fetch table testDB.TestTable. null (state=42000,code=40000)

Highlighted

Error: Error while compiling statement: FAILED: SemanticException Unable to fetch table testDB.TestTable. null (state=42000,code=40000)

New Contributor

0: jdbc:hive2://zaplncb00009q39-hs.qa.hadoop.> drop table testDB.TestTable; Error: Error while compiling statement: FAILED: SemanticException Unable to fetch table testDB.TestTable. null (state=42000,code=40000)

While performing any query on this table, I'm getting this error. Not able to delete database as well.

4 REPLIES 4

Re: Error: Error while compiling statement: FAILED: SemanticException Unable to fetch table testDB.TestTable. null (state=42000,code=40000)

New Contributor

Were you able to resolve this? We are getting similar errors

Re: Error: Error while compiling statement: FAILED: SemanticException Unable to fetch table testDB.TestTable. null (state=42000,code=40000)

New Contributor

Is this issue resolved?

Re: Error: Error while compiling statement: FAILED: SemanticException Unable to fetch table testDB.TestTable. null (state=42000,code=40000)

New Contributor

@Mayank Bhatt @sundeep dande We had to contact Hortonworks support to fix it. As per them the metadata was corrupted. I don't have the steps to fix that.

P.S.One of the reasons why the metadata was getting corrupted was someone had created many managed table pointing external hdfs location. Though the table in question was not one of those tables.

Re: Error: Error while compiling statement: FAILED: SemanticException Unable to fetch table testDB.TestTable. null (state=42000,code=40000)

New Contributor

@Mayank Bhatt @sundeep dande I faced the same issue too. When I changed the engine from tez to mr(mapreduce) it worked!