Commit eb4f7292 authored by yindanlei's avatar yindanlei

add fangan_day report codes

parent 7d452b9e
......@@ -45,17 +45,13 @@ FROM
or (partition_date = '20200724' AND substr(convup(sha1(device_id),16,10),-1) in ('0','1','2','3','4'))
or (partition_date >= '20200728' AND substr(convup(sha1(device_id),16,10),-1) in ('0','1','2','3','4')) THEN '测试组A(方案库)'
else '测试组B(无方案库)' END as grey_type
,CASE WHEN (partition_date>='20190601' and tmp.col2 = 'AI')
or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%')
or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%') or (first_channel_source_type like 'aiqiyiand%')
or (first_channel_source_type like 'bilibili%') or (first_channel_source_type like 'kuaishou%')))
THEN 'AI' ELSE '医美' END as channel_type
,CASE WHEN is_ai_channel = 'true' THEN 'AI' ELSE '医美' END as channel_type
FROM online.ml_device_day_active_status
LEFT JOIN
(SELECT col1,col2 --col1:子渠道,col2:是否属于AI,col3:标识
FROM pm.tl_pm_ydl
WHERE col3='0204_danlei_channel')tmp
on first_channel_source_type=tmp.col1
(SELECT code,is_ai_channel,partition_day
FROM DIM.DIM_AI_CHANNEL_ZP_NEW
WHERE partition_day>= '20200724' AND partition_day <=regexp_replace(date_sub(current_date(),1),'-','')) tmp
ON m.partition_date=tmp.partition_day AND first_channel_source_type=code
where partition_date>='20200724' AND partition_date<=regexp_replace(date_sub(current_date(),1),'-','')
AND active_type in ('1','2','4')
)t1
......
#step1_16.job
type=command
command=sh /home/bi/bi-report/lib/shell/waitsuccess.sh hive dim DIM_AI_CHANNEL_ZP_NEW
\ No newline at end of file
#step2.job
type=command
dependencies=step1_1,step1_2,step1_3,step1_4,step1_5,step1_6,step1_7,step1_8,step1_9,step1_10,step1_11,step1_12,step1_13,step1_14,step1_15
dependencies=step1_1,step1_2,step1_3,step1_4,step1_5,step1_6,step1_7,step1_8,step1_9,step1_10,step1_11,step1_12,step1_13,step1_14,step1_15,step1_16
command=sh /home/bi/bi-report/lib/shell/hive fangan_day
\ No newline at end of file
#step3.job
type=command
dependencies=step2
command=curl -X GET http://localhost:8553/api/report/email/fangan_day/dailiang@igengmei.com/cp-sunyinghe@igengmei.com,yindanlei@igengmei.com
\ No newline at end of file
command=curl -X GET http://localhost:8553/api/report/email/fangan_day/dailiang@igengmei.com/cp-sunyinghe@igengmei.com,yindanlei@igengmei.com,pengqiang@igengmei.com
\ No newline at end of file
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