Commit b0fa04ad authored by litaolemo's avatar litaolemo

update

parent a49e6fd2
......@@ -113,17 +113,18 @@ for t in range(1, task_days):
yesterday_str_format = (now + datetime.timedelta(days=-1)).strftime("%Y-%m-%d")
one_week_age_str = (now + datetime.timedelta(days=-7)).strftime("%Y%m%d")
new_urser_device_id_sql = r"""
select t3.device_id as device_id from
((select device_id from online.ml_device_day_active_status where partition_date = '{today_str}' and active_type in (1,2)) t2
select t2.device_id as device_id 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
)dev
on t2.device_id=dev.device_id
WHERE dev.device_id is null and t2.device_id is not null) t3
WHERE dev.device_id is null and t2.device_id is not null
""".format(today_str=today_str, yesterday_str_format=yesterday_str_format, today_str_format=today_str_format,
tomorrow_str=tomorrow_str)
......
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