Commit 4bc5c3f0 authored by litaolemo's avatar litaolemo

update

parent 7fc99c2c
......@@ -92,7 +92,7 @@ device_id_dict = {}
huidu_device_id_sql = r"""
select t2.device_id from
(select first_device as device_id from online.ml_user_history_detail where partition_date = {today_str} and substr(md5(device_id),-1) in ('8', '9', 'a', 'b')) t2
(select first_device as device_id from online.ml_user_history_detail where partition_date = {today_str} and substr(md5(first_device),-1) in ('8', '9', 'a', 'b')) t2
LEFT JOIN
(
......@@ -171,7 +171,7 @@ sql_res = huidu_device_id_df.collect()
for device_id in sql_res:
device_id_dict[device_id] = 1
# 内容池数量
# 设备对应画像数量
second_demands_tag_count = {}
projects_demands_tag_count = {}
# 帖子对应的tag
......@@ -308,7 +308,8 @@ for tag_id in second_demands_id_count:
temp_dict = {
"tag_name": tag_id,
"device_count": second_demands_tag_count[tag_id],
"tractate_count": len(set(second_demands_id_count[tag_id])),
"tractate_count": second_demands_count_dict.get(tag_id),
"exporsure_count": len(set(second_demands_id_count[tag_id])),
# "session_pv_count": len(set(second_demands_id_count[tag_id]))
}
print(temp_dict)
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