【问题标题】:Issue in reading records from hive bucket从蜂巢桶读取记录的问题
【发布时间】:2021-06-07 06:21:10
【问题描述】:

我创建了一个带有 4 个桶的蜂巢表.. 我可以从第 n 个桶中读取数据..

例如..

Select * from collection tablesample(bucket 1 out of 4 on loan_id)

但是如何从第二和第三桶中检索数据..

【问题讨论】:

    标签: sql hive hiveql sample


    【解决方案1】:

    试试 UNION ALL:

    Select * from collection tablesample(bucket 2 out of 4 on loan_id)
    UNION ALL
    Select * from collection tablesample(bucket 3 out of 4 on loan_id)
    

    【讨论】:

    • @MuraliSelvaraj 如果可行,请接受/支持答案
    猜你喜欢
    • 2018-05-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-03
    • 2019-10-12
    • 1970-01-01
    • 2016-01-05
    • 1970-01-01
    相关资源
    最近更新 更多