Commit e193136c by wangjf

fix

parent 7e6fff30
......@@ -2,6 +2,6 @@
DT=$(date +%Y%m%d -d "-1 day $ScheduleTime")
LAST_DT=$(date +%Y%m%d -d "-7 day $DT")
LAST_DT=$(date +%Y%m%d -d "-30 day $DT")
hive -hivevar dt=${DT} -hivevar last_dt=${LAST_DT} -f app_start.sql
\ No newline at end of file
......@@ -5,10 +5,13 @@ SET mapreduce.map.memory.mb=4096;
SET mapreduce.map.java.opts=-Xmx8192m;
SET mapreduce.reduce.memory.mb=4096;
SET mapreduce.reduce.java.opts=-Xmx8192m;
SET hive.mapred.mode=nonstrict;
DROP TABLE IF EXISTS package_num;
CREATE TABLE package_num AS SELECT package_name,count(1) install_num FROM dwh.dm_install_list_v2 WHERE dt = '${dt}' GROUP BY package_name
HAVING count(1) > 30000 ORDER BY install_num DESC LIMIT 5000;
CREATE TABLE package_num AS SELECT d.package_name,count(1) install_num FROM dwh.dm_install_list_v2 d,dwh.dim_package_tags t
WHERE d.dt = '${dt}' AND d.update_date BETWEEN '${LAST_DT}' AND '${dt}' AND d.package_name <> t.package_name
GROUP BY d.package_name HAVING count(1) > 30000
ORDER BY install_num DESC LIMIT 5000;
DROP TABLE IF EXISTS package_info;
CREATE TABLE package_info AS
......
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