Commit bee817f5 authored by litaolemo's avatar litaolemo

update

parent 120af132
This diff is collapsed.
...@@ -80,16 +80,20 @@ spark.sql("CREATE TEMPORARY FUNCTION arrayMerge AS 'com.gmei.hive.common.udf.UDF ...@@ -80,16 +80,20 @@ spark.sql("CREATE TEMPORARY FUNCTION arrayMerge AS 'com.gmei.hive.common.udf.UDF
sql_search_ctr = r""" sql_search_ctr = r"""
SELECT SELECT
count(1) cl_id,
from card_id,
transaction_type,
count(distinct app_session_id) as session_pv
FROM
( (
SELECT SELECT
cl_id, cl_id,
card_id, card_id,
app_session_id app_session_id,
transaction_type
from online.ml_community_precise_exposure_detail from online.ml_community_precise_exposure_detail
WHERE partition_date>='{today_str}' WHERE partition_date>= '${today_str}'
AND action in ('page_precise_exposure','home_choiceness_card_exposure') --7745版本action改为page_precise_exposure AND action in ('page_precise_exposure','home_choiceness_card_exposure') --7745版本action改为page_precise_exposure
AND is_exposure = '1' ----精准曝光 AND is_exposure = '1' ----精准曝光
AND page_name ='home' AND page_name ='home'
...@@ -103,7 +107,7 @@ SELECT ...@@ -103,7 +107,7 @@ SELECT
transaction_type, transaction_type,
card_id, card_id,
app_session_id app_session_id
) ) a group by cl_id,card_id,transaction_type
""".format(today_str='20200922') """.format(today_str='20200922')
print(sql_search_ctr) print(sql_search_ctr)
......
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