创建两个partition的hive表
1、创建两个partition的hive表
CREATE EXTERNAL TABLE t_result_analysis_web_stat( appid int, type string, key string, statdate string, uv string, pv string, extra string) PARTITIONED BY ( datecol string,identify string) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat';
2、结果
18:58 [[email protected]]$ hadoop fs -ls /warehouse/hive/warehouse/ent.db/t_result_analysis_web_stat/datecol=2014-11-23 Found 4 items drwxr-xr-x - yule entlog 0 2014-11-24 18:34 /warehouse/hive/warehouse/ent.db/t_result_analysis_web_stat/datecol=2014-11-23/identify=city drwxr-xr-x - yule hadoop 0 2014-11-24 18:24 /warehouse/hive/warehouse/ent.db/t_result_analysis_web_stat/datecol=2014-11-23/identify=ip drwxr-xr-x - yule entlog 0 2014-11-24 18:39 /warehouse/hive/warehouse/ent.db/t_result_analysis_web_stat/datecol=2014-11-23/identify=isp drwxr-xr-x - yule entlog 0 2014-11-24 18:29 /warehouse/hive/warehouse/ent.db/t_result_analysis_web_stat/datecol=2014-11-23/identify=province
相关推荐
zlsdmx 2020-07-05
tugangkai 2020-07-04
eternityzzy 2020-07-19
genshengxiao 2020-06-26
victorzhzh 2020-06-16
archive 2020-05-28
taisenki 2020-05-27
archive 2020-07-30
成长之路 2020-07-28
taisenki 2020-07-05
tugangkai 2020-07-05
SignalDu 2020-07-05
tomson 2020-07-05
tomson 2020-07-05
Zhangdragonfly 2020-06-28
成长之路 2020-06-26