Jelajahi Sumber

MOD:dw_image_cost_day 修改为计划维度

cxyu 3 tahun lalu
induk
melakukan
8d3926aa5b
1 mengubah file dengan 4 tambahan dan 4 penghapusan
  1. 4 4
      app/etl/dw/dw_image_cost_day.py

+ 4 - 4
app/etl/dw/dw_image_cost_day.py

@@ -26,7 +26,7 @@ def run(dt):
             left join channel_info_daily f on e.channel=f.channel and e.dt=f.dt
             left join campaign_info g on b.campaign_id = g.campaign_id 
             where a.dt='{dt}'  and c.is_video=0 and g.campaign_id is not null
-            group by a.dt,b.type,title,description,book,platform,stage,image_id,e.channel,pitcher
+            group by g.campaign_id 
             
             """
 
@@ -136,8 +136,7 @@ def run(dt):
             left join video_info g on c.image_id=g.video_id
             left join campaign_info h on b.campaign_id = h.campaign_id 
             where a.dt='{dt}'  and c.is_video=1 and h.campaign_id  is not null
-            group by a.dt,b.type,title,description,
-            book,platform,stage,image_id,e.channel,pitcher) as foo
+            group by h.campaign_id) as foo
             inner join             
             (select pitcher,min(h.last_modified_time) as last_modified_time  
             from 
@@ -251,8 +250,9 @@ if __name__ == '__main__':
     )
     # -495
     #
-    for i in du.getDateLists(du.get_n_days(-3), du.get_n_days(0)):
+    for i in du.getDateLists(du.get_n_days(-495), du.get_n_days(0)):
         print(i)
+        # exit()
         run(i)
 
     # print(du.get_n_days(-20))