Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What about the error Cannot truncate non-managed table when emptying the hive table

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to report an error Cannot truncate non-managed table when emptying the hive table. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

When you execute the command truncate to clear the hive table

The error is as follows: FAILED: SemanticException [Error 10146]: Cannot truncate non-managed table mtime_qa.userorder_logs

What I emptied is an external watch.

As shown in the figure:

Look at the official explanation of hortontworks:

Note:This error happens when you're trying to truncate an external table. Truncate needs to target a native/managed table or an exception will be thrown.

Here's a really great reference:

Https://community.hortonworks.com/questions/38807/hive-overwrtite-table.html

The main idea is that the table to be emptied is an external table, which is of course not managed by hive. Hive only maintains a reference relationship to the external table and cannot empty the external data. Therefore, if there are table editing operations such as emptying the table, it is better to build an internal table.

This is the end of the article on "how to report an error Cannot truncate non-managed table when emptying the hive table". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report