Hive 创建外部分区表

1、hive 创建外部表

create external table t_ods_test (

uid string COMMENT '用户id',

terminal string COMMENT '终端类型',

adslotid string COMMENT '广告位id',

cid string COMMENT 'cid',

amount string COMMENT '库存量',

local string COMMENT '地域',

tags string COMMENT '标签' )

partitioned by (year string,month string,day string) row format delimited fields  terminated by '\t'

STORED AS TEXTFILE location '/user/qgw/hh/app/usertagview';

2、hive 外部表,增加分区

alter table t_ods_test add partition (year='2017', month='10', day='18') location '2017/10/18';

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容