Commit 1d8d3a70 authored by litaolemo's avatar litaolemo

update

parent e750dde5
......@@ -94,19 +94,13 @@ for t in range(0, task_days):
sql_search_ctr = r"""
select t0.device_id as device_id,click.query from
(
(select device_id from online.ml_device_day_active_status where partition_date = '{today_str}' and active_type in (1,2))t2
LEFT JOIN
(
select distinct device_id
from ML.ML_D_CT_DV_DEVICECLEAN_DIMEN_D
where PARTITION_DAY = '{today_str}'
AND is_abnormal_device = 'true'
)dev
on t2.device_id=dev.device_id
WHERE dev.device_id is null and t2.device_id is not null) t0 left join
( SELECT cl_id,
--搜索pvuv
SELECT query
partition_date,
cl_id
FROM (
SELECT cl_id,
partition_date,
action,
params['page_name'] as page_name,
......@@ -199,8 +193,6 @@ WHERE dev.device_id is null and t2.device_id is not null) t0 left join
AND params['card_type'] = 'highlight_word'
) click
on click.cl_id=t0.device_id
""".format(start_date=yesterday_str, end_date=today_str,today_str=yesterday_str)
print(sql_search_ctr)
......@@ -211,9 +203,9 @@ WHERE dev.device_id is null and t2.device_id is not null) t0 left join
for name in sql_res:
# print(name)
word = name.query
doc_id = name.device_id
cl_id = name.cl_id
if "发型" in word:
print(word,doc_id)
print(word,cl_id)
# partition_date = str(now + datetime.timedelta(days=-1))
# tag_names_list_week.append((word, nums, uv, partition_date))
#
......
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