Commit c928eb56 by mengdongxing

Update tkdm_base_device_pay_info.sql

parent e72576d0
set hive.skewjoin.key=100000; set hive.ignore.mapjoin.hint=flase;
set hive.skewjoin.key=10000;
set hive.optimize.skewjoin=true; set hive.optimize.skewjoin=true;
set hive.input.format=org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat; set hive.input.format=org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat;
set hive.optimize.bucketmapjoin = true; set hive.optimize.bucketmapjoin = true;
set hive.optimize.bucketmapjoin.sortedmerge = true; set hive.optimize.bucketmapjoin.sortedmerge = true;
set hive.merge.mapredfiles=true;
insert overwrite table tkdm.tkdm_base_device_pay_info partition(ds='2017-02-23') insert overwrite table tkdm.tkdm_base_device_pay_info partition(ds='2017-02-23')
select /*+mapjoin(a)*/ nvl(b.appid,a.appid) as appid, select /*+mapjoin(a)*/ nvl(b.appid,a.appid) as appid,
nvl(b.deviceid,a.deviceid) as deviceid, nvl(b.deviceid,a.deviceid) as deviceid,
nvl(b.first_payment_ds,'2017-02-23') as first_payment_ds, nvl(b.first_payment_ds,'2017-02-23') as first_payment_ds,
...@@ -27,7 +28,7 @@ from ...@@ -27,7 +28,7 @@ from
group by appid,deviceid group by appid,deviceid
distribute by appid ,deviceid distribute by appid ,deviceid
) a ) a
full join join
(select appid, (select appid,
deviceid, deviceid,
...@@ -42,6 +43,8 @@ full join ...@@ -42,6 +43,8 @@ full join
use tkdm; use tkdm;
...@@ -60,4 +63,5 @@ ROW FORMAT DELIMITED ...@@ -60,4 +63,5 @@ ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t' FIELDS TERMINATED BY '\t'
STORED AS ORC STORED AS ORC
location 's3://reyuntkio/warehouse/tkio/tkdm.db/tkdm_base_device_pay_info' location 's3://reyuntkio/warehouse/tkio/tkdm.db/tkdm_base_device_pay_info'
; ;
\ 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