|
@@ -28,7 +28,7 @@ class UnitHourlyReport:
|
|
stat_date between {start_time} and {end_time}""".format(
|
|
stat_date between {start_time} and {end_time}""".format(
|
|
start_time=self.start_time, end_time=self.end_time)
|
|
start_time=self.start_time, end_time=self.end_time)
|
|
totalNum = TidbConn.quary(sql)[0][0]
|
|
totalNum = TidbConn.quary(sql)[0][0]
|
|
- pageCount = ceil(totalNum / 5000)
|
|
|
|
|
|
+ pageCount = ceil(totalNum / 3000)
|
|
for i in range(pageCount):
|
|
for i in range(pageCount):
|
|
sql = """replace into application.kuaishou_unit_report_hourly_dw
|
|
sql = """replace into application.kuaishou_unit_report_hourly_dw
|
|
(account_id, stat_date,`hour`, campaign_id, campaign_name, unit_id, unit_name, project_id, product_id, advertiser_id,
|
|
(account_id, stat_date,`hour`, campaign_id, campaign_name, unit_id, unit_name, project_id, product_id, advertiser_id,
|
|
@@ -209,8 +209,8 @@ class UnitHourlyReport:
|
|
left join
|
|
left join
|
|
`jeecg-boot`.ctop_account_attribution_info sys
|
|
`jeecg-boot`.ctop_account_attribution_info sys
|
|
on report.advertiser_id = sys.account_id
|
|
on report.advertiser_id = sys.account_id
|
|
- where report.stat_date between {start_time} and {end_time} order by unit_id,hour,stat_date limit {num},5000""".\
|
|
|
|
- format(start_time=self.start_time, end_time=self.end_time,num=i * 5000)
|
|
|
|
|
|
+ where report.stat_date between {start_time} and {end_time} order by unit_id,hour,stat_date limit {num},3000""".\
|
|
|
|
+ format(start_time=self.start_time, end_time=self.end_time,num=i * 3000)
|
|
TidbConn.exec_sql(self.conn, sql)
|
|
TidbConn.exec_sql(self.conn, sql)
|
|
self.conn.commit()
|
|
self.conn.commit()
|
|
return 0
|
|
return 0
|