简体   繁体   English

尽管运行正常,但在Hive中插入覆盖不会加载数据。

[英]Insert Overwrite in Hive is not loading the data although it runs ok.

I created the table and and ran Insert Overwrite to load selected data from tables but it not loading the data although it runs ok. 我创建了表,然后运行“插入覆盖”以从表中加载选定的数据,尽管运行正常,但它不会加载数据。 Any idea? 任何想法?

Check if your select query returns 0 records. 检查您的选择查询是否返回0条记录。 If so, old data doesn't get overwritten. 如果是这样,则旧数据不会被覆盖。

As of Hive 0.14, if a table has an OutputFormat that implements AcidOutputFormat and the system is configured to use a transaction manager that implements ACID, then INSERT OVERWRITE will be disabled for that table. 从Hive 0.14开始,如果表具有实现AcidOutputFormat的OutputFormat,并且系统配置为使用实现ACID的事务管理器,则将对该表禁用INSERT OVERWRITE。 This is to avoid users unintentionally overwriting transaction history. 这是为了避免用户无意间覆盖交易历史记录。 The same functionality can be achieved by using TRUNCATE TABLE (for non-partitioned tables) or DROP PARTITION followed by INSERT INTO. 通过使用TRUNCATE TABLE(用于未分区的表)或DROP PARTITION后接INSERT INTO,可以实现相同的功能。

This might be your case 这可能是你的情况

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM