Commit f5c07267 authored by litaolemo's avatar litaolemo

update

parent e52a06e0
......@@ -81,8 +81,8 @@ spark.sql("CREATE TEMPORARY FUNCTION is_json AS 'com.gmei.hive.common.udf.UDFJso
spark.sql("CREATE TEMPORARY FUNCTION arrayMerge AS 'com.gmei.hive.common.udf.UDFArryMerge'")
task_days = 120
for t in range(5, task_days):
task_days = 3
for t in range(0, task_days):
day_num = 0 - t
now = (datetime.datetime.now() + datetime.timedelta(days=day_num))
last_30_day_str = (now + datetime.timedelta(days=-30)).strftime("%Y%m%d")
......
......@@ -94,12 +94,9 @@ spark.sql("CREATE TEMPORARY FUNCTION arrayMerge AS 'com.gmei.hive.common.udf.UDF
# huidu_device_id_df.createOrReplaceTempView("dev_view")
sql_search_ctr = r"""
select count(1) from (
SELECT partition_date,
SELECT partition_date,
cl_id,
v.recommend_type,
count(card_id) as session_pv0,
count(distinct app_session_id) as session_pv
FROM
(
SELECT partition_date,
......
......@@ -470,6 +470,7 @@ CREATE TABLE recommend_strategy_d_fix(
recommend_ctr FLOAT,
second_jump_ctr FLOAT,
click_ctr FLOAT,
page_pv_20_percent FLOAT,
pid varchar(100),
PRIMARY KEY ( pid )
......@@ -478,5 +479,5 @@ CREATE TABLE recommend_strategy_d_fix(
alert
ALTER TABLE recommend_strategy_d ADD recommend_ctr FLOAT;
ALTER TABLE recommend_strategy_d ADD second_jump_ctr FLOAT;
ALTER TABLE recommend_strategy_d ADD click_ctr FLOAT;
ALTER TABLE recommend_strategy_d_fix ADD page_pv_20_percent FLOAT;
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