Hive Table Sampling – Concept and Example

本文介绍了Hive表采样的概念、方法和示例。Hive的TABLESAMPLE子句允许用户对大型表的少量数据进行查询,而非全表。采样适用于处理返回结果耗时的大型表。采样类型包括桶化采样和块采样,语法中涉及指定列或使用rand()函数。桶化采样基于桶号获取样本记录,块采样则按百分比选取至少n%的数据大小。
摘要由CSDN通过智能技术生成

Hive Table Sampling - Concept, Methods and Example, Hive Table Sampling Concept

The Relational databases like SQL server supports writing queries on a relatively small number of rows from the very large table. In this article, we will check Hive table sampling concept, methods and some examples.

The Hive TABLESAMPLE clause allows the users to write queries for samples of the data instead of the whole table. The sampling comes handy when you are working on the large tables and it takes time to return results. The TABLESAMPLE clause can be added to any table in the FROM clause.

Type of Hive Sampling

There are two type of Hive tables sampling

  • Sampling Buc
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

光剑书架上的书

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值