|
@@ -282,8 +282,7 @@ from media_api.kuaishou_material_video_report_daily report
|
|
where report.stat_date between {start_time} and {end_time} and report.photo_id!=0
|
|
where report.stat_date between {start_time} and {end_time} and report.photo_id!=0
|
|
order by advertiser_id,photo_id ,stat_date limit {num},20000""".format(
|
|
order by advertiser_id,photo_id ,stat_date limit {num},20000""".format(
|
|
start_time=self.start_time, end_time=self.end_time, num=i * 20000)
|
|
start_time=self.start_time, end_time=self.end_time, num=i * 20000)
|
|
- trace_log1 = Logger().etl_logger('kwai', MateirialVideoDailyReport().start_time)
|
|
|
|
- trace_log1.info(sql)
|
|
|
|
|
|
+ print(sql)
|
|
TidbConn.exec_sql(self.conn, sql)
|
|
TidbConn.exec_sql(self.conn, sql)
|
|
self.conn.commit()
|
|
self.conn.commit()
|
|
return 0
|
|
return 0
|
|
@@ -294,9 +293,7 @@ from media_api.kuaishou_material_video_report_daily report
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|
|
status = MateirialVideoDailyReport().daily_report()
|
|
status = MateirialVideoDailyReport().daily_report()
|
|
- media_name = 'kwai'
|
|
|
|
- trace_log = Logger().etl_logger(media_name, MateirialVideoDailyReport().start_time)
|
|
|
|
if status == 0:
|
|
if status == 0:
|
|
- trace_log.info("作业执行成功")
|
|
|
|
|
|
+ print("作业执行成功")
|
|
else:
|
|
else:
|
|
- trace_log.error("作业执行失败")
|
|
|
|
|
|
+ print("作业执行失败")
|