存储和压缩
-
测试不同的存储格式
-- 新建一张未压缩的文本格式表 create table bigtable_text( id bigint, t bigint, uid string, keyword string, url_rank int, click_num int, click_url string ) row format delimited fields terminated by '\t'; -- 数据导入 load data local inpath '/opt/module/hive/datas/bigtable' into table bigtable;
-- 创建一张orc存储格式未压缩的表格 create table bigtable_orc( id bigint, t bigint, uid string, keyword string, url_rank int, click_num int, click_url string ) row format delimited fields terminated by '\t' stored as orc tblproperties('orc.compress'='NONE'); -- 数据导入 insert into bigtable_orc select * from bigtable_text;
-- 创建一张parquet存储格式未压缩的表格 create table bigtable_parquet( id bigint, t bigint, uid string, keyword string, url_rank int, click_num int, click_url string ) row format delimited fields terminated by &