Hive建分区表语句

李双喆 2015-02-06

** 用户属性表(日) ************************************************************
CREATE TABLE ZB_DWD.DWD_D_PRD_AL_USER_ATTR_PROV
(MONTH_ID STRING,
PROV_ID STRING,
USER_ID STRING,
ATTRIBUTE_TYPE STRING,
ATTRIBUTE_VALUE STRING,
ATTR_EFFECT_TIME STRING,
ATTR_EXPIRE_TIME STRING,
IS_VALID STRING)
PARTITIONED BY(PART_ID STRING,DAY_ID STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS TEXTFILE;
******************************************************************************** 

** 用户属性表(日) ************************************************************
CREATE TABLE ZB_DWD.DWD_D_PRD_AL_USER_ATTR_PROV
(MONTH_ID STRING,
PROV_ID STRING,
USER_ID STRING,
ATTRIBUTE_TYPE STRING,
ATTRIBUTE_VALUE STRING,
ATTR_EFFECT_TIME STRING,
ATTR_EXPIRE_TIME STRING,
IS_VALID STRING)
PARTITIONED BY(DAY_ID STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS TEXTFILE;
********************************************************************************

相关推荐