renyupeng 3 år sedan
förälder
incheckning
4780de6209

+ 3 - 3
Apietl/kwai_etl/report/UnitDailyReport.py

@@ -25,7 +25,7 @@ class UnitDailyReport:
             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 / 5000)
+            pageCount = ceil(totalNum / 3000)
             for i in range(pageCount):
                 sql = """replace into application.kuaishou_unit_report_daily_dw
 (account_id, stat_date, campaign_id, campaign_name, unit_id, unit_name, project_id, product_id, advertiser_id,
@@ -205,8 +205,8 @@ class UnitDailyReport:
                  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,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,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)
                 self.conn.commit()
             return 0

+ 3 - 3
Apietl/kwai_etl/report/UnitHourlyReport.py

@@ -28,7 +28,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 / 5000)
+            pageCount = ceil(totalNum / 3000)
             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,
@@ -209,8 +209,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},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)
                 self.conn.commit()
             return 0