桶表是对数据进行哈希取值,然后放到不同文件中存储
创建一个桶表
create table bucket_table(id int,name string) clustered by(id) into 4 buckets;加载数据
set hive.enforce.bucketing = true; insert into table bucket_table select name from stu; insert overwrite table bucket_table select name from stu;PS:数据加载到桶表时,会对字段取hash值,然后与桶的数量取模。把数据放到对应的文件中。
继续阅读与本文标签相同的文章
上一篇 :
hive分区表
下一篇 :
hive orc文件读取
-
弹性伸缩定时任务支持Crontab
2026-05-25栏目: 教程
-
关于Python的几个过坑指南(MySQL-python、tornado)
2026-05-25栏目: 教程
-
教你如何使用 flask 框架在浏览器打印 hello world
2026-05-25栏目: 教程
-
@ConditionalOn...注解,条件组合你知道吗?
2026-05-25栏目: 教程
-
表观调控13张图之一证明基因干扰有效性
2026-05-25栏目: 教程
