赞
踩
无
在hive中对某个表执行任何操作,都会报错:
hive Error SemanticException Unable to fetch table
而同库内其他表,其他库的表,均可以正常查询。
无
hive的mysql元数据表内存在脏数据导致
1. select DB_ID from DBS where NAME='your-database-name'
2. select tbl_id from TBLS where TBL_NAME='your-table-name' and DB_ID=<id from step 1>;
3. delete from PARTITION_KEY_VALS WHERE PART_ID in (select PART_ID from PARTITIONS where TBL_ID=<id from step 2>);
4. delete from PARTITION_PARAMS WHERE PART_ID in (select PART_ID from PARTITIONS where TBL_ID=<id from step 2>);
5. delete from PARTITIONS where TBL_ID=<id from step 2>;
6. delete from TBL_COL_PRIVS where TBL_ID=<id from step 2>;
7. delete from TBL_PRIVS where TBL_ID=<id from step 2>;
8. delete from TBLS where TBL_ID=<id from step 2>;
9. COMMIT;
问题发生的原因还没找到。
好记性不如赖笔头。
与君共勉。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。