|
@@ -30,7 +30,7 @@ class UnitHourlyReport:
|
|
|
stat_date between {start_time} and {end_time}""".format(
|
|
|
start_time=self.start_time, end_time=self.end_time)
|
|
|
totalNum = TidbConn.quary(sql)[0][0]
|
|
|
- pageCount = ceil(totalNum / 20000)
|
|
|
+ pageCount = ceil(totalNum / 10000)
|
|
|
for i in range(pageCount):
|
|
|
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,
|
|
@@ -211,8 +211,8 @@ class UnitHourlyReport:
|
|
|
left join
|
|
|
`jeecg-boot`.ctop_account_attribution_info sys
|
|
|
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},20000""".\
|
|
|
- format(start_time=self.start_time, end_time=self.end_time,num=i * 20000)
|
|
|
+ where report.stat_date between {start_time} and {end_time} order by unit_id,hour,stat_date limit {num},10000""".\
|
|
|
+ format(start_time=self.start_time, end_time=self.end_time,num=i * 10000)
|
|
|
print(sql)
|
|
|
TidbConn.exec_sql(self.conn, sql)
|
|
|
self.conn.commit()
|