Hive Buckets-understanding TABLESAMPLE(BUCKET X OUT OF Y)
问题 Hi i am very much new to hive,i have gone through buckets concept in hadoop in action,but failed to understand the below lines.can any one help me on this? SELECT avg(viewTime) FROM page_view TABLESAMPLE(BUCKET 1 OUT OF 32); The general syntax for TABLESAMPLE is TABLESAMPLE(BUCKET x OUT OF y) The sample size for the query is around 1/y. In addition, y needs to be a multiple or factor of the number of buckets specified for the table at table creation time. For example, if we change y to 16,