Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

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

New Contributor

Unable to perform any operation on that table.
The command that I tried to execute is drop table tbale_name;


Master Mentor

@sundeep dande

Can you be more precise? Are you dropping a Mysql; oracle, hive or hbase table? And please under which user were you executing the command,? Have you checked whether you have the correct privileges on the object(table) ie like drop,delete , update etc?

New Contributor

I am trying to drop a hive table and yes I have all the correct user level privileges on that table. I am getting that error only when I try to drop certain tables.


The above question and the entire response thread below was originally posted in the Community Help track. On Sat Jul 27 19:22 UTC 2019, a member of the HCC moderation staff moved it to the Data Processing track. The Community Help Track is intended for questions about using the HCC site itself, not technical questions about the Nifi Web UI.

Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

New Contributor

Take MySQL backup before doing this operation.

Go to MySQL

use <DB>;
select * from TBLS where tbl_name = '<table_name>';

Make a note of TBL_ID from the table and delete entries from TABLE_PARAMS , TBL_COL_PRIVS , TBL_PRIVS using where clause TBL_ID

After getting this done, try the below command.

delete from TBLS where tbl_name = '<table_name>';

Now open hive shell and check for the table.