SET mapreduce.job.queuename=yjy;
SET hive.cli.print.header=TRUE;
set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nonstrict;
use dm_userimage;
create table dm_userimage.f_userimage_phonelist (
phone string comment '通讯录电话',
user_id string comment '用户编号',
name string comment '通讯录姓名',
phone_province string comment '电话归属地省',写博客
phone_city string comment '电话归属地市'
)
partitioned by (etl_date date)
row format delimited fields terminated by '\t'
stored as textfile;
如要添加到Es添加下两行 * 部分根据自己需要修改
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES('es.nodes'='10.100.*.*','es.port'='9200','es.resource' = 'phb_d_cmc/*','es.net.http.auth.user'='*','es.net.http.auth.pass'='*','es.mapping.id'='telno');