Commit 4c2bdf5f by mengdongxing

Add new file

parent c928eb56
set hive.input.format=org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
set mapred.min.split.size.per.rack=100000000;
set mapred.min.split.size.per.node=100000000;
set mapred.max.split.size=256000000;
set hive.merge.mapfiles = true;
set hive.merge.smallfiles.avgsize=16000000;
insert overwrite table tkdm.tkdm_data_payment_day partition(ds='2017-02-24')
select appid,
deviceid,
if(to_date('ins_datetime')='2017-02-03',1,0) as is_new,
count(1) as num_payment_cnt,
round(sum(amount),2) as amt_payment
from tkio.tkio_mid_pay_day
where ds='2017-02-24' and
deviceid!='00000000-0000-0000-0000-000000000000'
and deviceid!='' and deviceid!='0'
group by appid,deviceid
distribute by appid ,deviceid
create EXTERNAL table tkdm_data_payment_day(
appid string,
deviceid string,
is_new int,
num_payment_cnt int,
amt_payment double
)
PARTITIONED BY (ds string)
clustered by (appid,deviceid) sorted by(appid,deviceid) into 4 buckets
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t'
STORED AS ORC
location 's3://reyuntkio/warehouse/tkio/tkdm.db/tkdm_data_payment_day'
;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment