hive udf,
set hive.exec.dynamic.partition=true; set hive.exec.dynamic.partition.mode=nonstrict; set hive.exec.max.dynamic.partitions.pernode=1000;
|
创建真实表:
create external table bi_rg.fact_call_logs
(callingnumber string,
callednumber string,
domain string,
frontid string,
category string,
mobile_code string,
list_type string,
barring_type string,
call_type string,
template_id string,
calling_areanumber string,
called_areanumber string,
location_number string)
partitioned by (stat_date string)
row format delimited fields terminated by ',';
导入真实表数据
insert OVERWRITE TABLE bi_rg.fact_call_logs
PARTITION (stat_date)
select
callingnumber,
callednumber,
domain,
frontid,
category,
judgeMobile(callingnumber) as monbile_code,
listtype,
barringtype,
calltype,
if(templet_no is null,"invalid",templet_no),
callingareanum,
calledareanum,
if(locationnumber is null,"invalid",locationnumber),
stat_date
from call_logs
where stat_date >= 20180101;
http://www.htsjk.com/hive/41753.html
www.htsjk.Com
true
http://www.htsjk.com/hive/41753.html
NewsArticle
hive udf, set hive . exec . dynamic . partition = true ; set hive . exec . dynamic . partition . mode = nonstrict ; set hive . exec . max . dynamic . partitions . pernode = 1000 ; 创建真实表:create external table bi_rg....
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。