-
创建分桶表
-- 1 创建分桶表 create table t_us_covid19_bucket( count_date string, county string, state string, fips int, cases int, deaths int ) clustered by (state) into 5 buckets ; --动态加载 insert into t_us_covid19_bucket select * from t_us_covid19;
-
创建分桶表 且 倒序排序
-- 3 创建分桶表 且 倒序排序 create table t_us_covid19_bucket_sort( count_date string, county string, state string, fips int, cases int, deaths int ) clustered by (state) sorted by (cases desc) into 5 buckets ; --动态加载 insert into t_us_covid19_bucket_sort select * from t_us_covid19;
Hive分桶表创建clustered by()
于 2022-02-16 23:42:06 首次发布