|
@@ -27,7 +27,7 @@ class MateirialVideoHourlyReport:
|
|
|
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_material_video_report_hourly_dw
|
|
|
(account_id, project_id, product_id, advertiser_id,
|
|
@@ -290,8 +290,8 @@ from media_api.kuaishou_material_video_report_hourly report
|
|
|
left join `jeecg-boot`.user_company uc on uc.user_id = clip.id
|
|
|
left join `jeecg-boot`.ctop_product product on product.id = cp.product_id
|
|
|
where report.stat_date between {start_time} and {end_time} and report.photo_id!=0
|
|
|
- order by advertiser_id,photo_id ,stat_date,`hour` limit {num},20000""".format(
|
|
|
- start_time=self.start_time, end_time=self.end_time, num=i * 20000)
|
|
|
+ order by advertiser_id,photo_id ,stat_date,`hour` limit {num},10000""".format(
|
|
|
+ start_time=self.start_time, end_time=self.end_time, num=i * 10000)
|
|
|
print(sql)
|
|
|
TidbConn.upsert(conn=self.conn, sql_buff=sql)
|
|
|
self.conn.commit()
|