Commit 769e1ca7 authored by litaolemo's avatar litaolemo

update

parent f31161e5
...@@ -105,8 +105,8 @@ for t in range(1, task_days): ...@@ -105,8 +105,8 @@ for t in range(1, task_days):
( (
SELECT device_id,partition_day,card_content_type SELECT device_id,partition_day,card_content_type
FROM ml.mid_ml_c_et_pe_preciseexposure_dimen_d FROM ml.mid_ml_c_et_pe_preciseexposure_dimen_d
WHERE partition_day >= '${start_date}' WHERE partition_day >= '{partition_day}'
and partition_day < '${end_date}' and partition_day < '{end_date}'
and action in ('page_precise_exposure','home_choiceness_card_exposure') and action in ('page_precise_exposure','home_choiceness_card_exposure')
and is_exposure = '1' and is_exposure = '1'
and page_code in ('search_result_diary','search_result_doctor','search_result_hospital','search_result_more' and page_code in ('search_result_diary','search_result_doctor','search_result_hospital','search_result_more'
...@@ -125,8 +125,8 @@ for t in range(1, task_days): ...@@ -125,8 +125,8 @@ for t in range(1, task_days):
( (
SELECT partition_date,cl_id,'service' as card_content_type,count(1) as click_pv SELECT partition_date,cl_id,'service' as card_content_type,count(1) as click_pv
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= '${start_date}' WHERE partition_date >= '{partition_day}'
AND partition_date < '${end_date}' AND partition_date < '{end_date}'
AND ((action in ('search_result_click_recommend_item','search_result_welfare_click_item') AND ((action in ('search_result_click_recommend_item','search_result_welfare_click_item')
AND page_name in ('search_result_more','search_result_welfare')) AND page_name in ('search_result_more','search_result_welfare'))
or (action = 'goto_welfare_detail' AND params ['from'] = 'search_result_welfare_recommend') or (action = 'goto_welfare_detail' AND params ['from'] = 'search_result_welfare_recommend')
...@@ -136,8 +136,8 @@ for t in range(1, task_days): ...@@ -136,8 +136,8 @@ for t in range(1, task_days):
UNION ALL UNION ALL
SELECT partition_date,cl_id,'neirong' as card_content_type,count(1) as click_pv SELECT partition_date,cl_id,'neirong' as card_content_type,count(1) as click_pv
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= '${start_date}' WHERE partition_date >= '{partition_day}'
AND partition_date < '${end_date}' AND partition_date < '{end_date}'
AND ((action in ('on_click_topic_card','on_click_diary_card','search_result_click_infomation_item') AND ((action in ('on_click_topic_card','on_click_diary_card','search_result_click_infomation_item')
AND page_name in ('search_result_more','search_result_diary','search_result_post')) AND page_name in ('search_result_more','search_result_diary','search_result_post'))
or (action = 'on_click_card' AND params['card_content_type'] in ('answer','diary') AND page_name in ('search_result_more','search_result_diary','search_result_question_answer'))) or (action = 'on_click_card' AND params['card_content_type'] in ('answer','diary') AND page_name in ('search_result_more','search_result_diary','search_result_question_answer')))
...@@ -162,10 +162,10 @@ for t in range(1, task_days): ...@@ -162,10 +162,10 @@ for t in range(1, task_days):
LEFT JOIN LEFT JOIN
(SELECT code,is_ai_channel,partition_day (SELECT code,is_ai_channel,partition_day
FROM DIM.DIM_AI_CHANNEL_ZP_NEW FROM DIM.DIM_AI_CHANNEL_ZP_NEW
WHERE partition_day>= '${start_date}' AND partition_day < '${end_date}' ) tmp WHERE partition_day>= '{partition_day}' AND partition_day < '{end_date}' ) tmp
ON m.partition_date=tmp.partition_day AND first_channel_source_type=code ON m.partition_date=tmp.partition_day AND first_channel_source_type=code
where partition_date >= '${start_date}' where partition_date >= '{partition_day}'
AND partition_date < '${end_date}' AND partition_date < '{end_date}'
AND active_type in ('1','2','4') AND active_type in ('1','2','4')
) mas ) mas
LATERAL VIEW explode(mas.channel) t2 AS channel LATERAL VIEW explode(mas.channel) t2 AS channel
......
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