|
@@ -194,7 +194,7 @@ def dm_pitcher_daily_page_total():
|
|
|
|
|
|
sql=f"""
|
|
|
insert into dm_pitcher_daily_page_total
|
|
|
-select '{dt.get_n_days(-1)}' dt,
|
|
|
+select '{dt.get_n_days(0)}' dt,
|
|
|
pitcher,
|
|
|
round(cost,2),
|
|
|
round(amount,2),
|
|
@@ -221,7 +221,7 @@ from (select pitcher,
|
|
|
left outer join
|
|
|
(select count(distinct channel) channel_count, pitcher
|
|
|
from dw_daily_channel_cost
|
|
|
- where dt = '{dt.get_n_days(-1)}'
|
|
|
+ where dt = '{dt.get_n_days(0)}'
|
|
|
group by pitcher) w
|
|
|
on q.pitcher = w.pitcher
|
|
|
left outer join(
|
|
@@ -271,7 +271,7 @@ left outer join (
|
|
|
|
|
|
having pitcher != ''"""
|
|
|
print(sql)
|
|
|
- ck.execute(f"alter table dm_pitcher_daily_page_total drop partition '{dt.get_n_days(-1)}'")
|
|
|
+ ck.execute(f"alter table dm_pitcher_daily_page_total drop partition '{dt.get_n_days(0)}'")
|
|
|
ck.execute(sql)
|
|
|
|
|
|
|
|
@@ -298,8 +298,8 @@ if __name__ == '__main__':
|
|
|
|
|
|
|
|
|
|
|
|
- dm_pitcher_daily_page_total()
|
|
|
-
|
|
|
+
|
|
|
+ dw_channel_daily_total('2021-01-11')
|
|
|
exit(0)
|
|
|
|
|
|
|