Hive表数据管理 [英] Hive table data management

查看:97
本文介绍了Hive表数据管理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Hive表。如果我有要求数据将每天进入Hive表。如果进入的数据是新记录(插入),则记录应该插入到配置单元表中,或者如果进入的数据已经存在(更新)在配置单元中,那么应该更新记录。



任何人都可以解释这是如何在Hive中实现的。



我在网上查询时发现了这篇文章。
http://hortonworks.com/blog/four- step-strategy-incremental-updates-hive /

解决方案

数据将每天进入Hive表 - 是数据摄取的一部分。您可以使用Sqoop Incremental Import来获得相同的效果。



(1) - 追加,当您知道最后一个值或
$时使用b $ b

(2) - 最后修改,当您有一个可用于追踪插入的DATE列时使用。

有关更新,您可以请按照您分享的链接中的说明使用外部表格。


I have a Hive table. If I have a requirement that the data will be coming into the Hive table daily. If the data which is coming in is a new record(inserts) then the record should be inserted into hive table or if the data which is coming in is already existing(updates) in hive then the record should be updated.

Can anyone explain how this is achieved in Hive.

I was checking online i found this article. http://hortonworks.com/blog/four-step-strategy-incremental-updates-hive/

解决方案

"the data will be coming into the Hive table daily" - is a part of Data Ingestion. You can use Sqoop Incremental Import for the same. Two ways in which it can be coded.

(1) -- append , use when you know the last value coming in or

(2) --last modified, use when you have a DATE column which can be used to track the inserts.

For updates, you can use External tables as explained in the link you shared.

这篇关于Hive表数据管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆