Browse Source

"etl 脚本"

renyupeng 3 năm trước cách đây
mục cha
commit
1431611954

+ 1 - 1
Apietl/kwai_etl/report/CampaignDailyReport.py

@@ -207,7 +207,7 @@ class CampaignDailyReport:
                     format(start_time=self.start_time, end_time=self.end_time, num=i * 5000)
                     format(start_time=self.start_time, end_time=self.end_time, num=i * 5000)
                 TidbConn.exec_sql(self.conn, sql)
                 TidbConn.exec_sql(self.conn, sql)
                 self.conn.commit()
                 self.conn.commit()
-                return 0
+            return 0
         except Exception as e:
         except Exception as e:
             logging.error(e)
             logging.error(e)
             return -1
             return -1

+ 1 - 1
Apietl/kwai_etl/report/CampaignHourlyReport.py

@@ -208,7 +208,7 @@ class CampaignHourlyReport:
                     format(start_time=self.start_time, end_time=self.end_time, num=i * 5000)
                     format(start_time=self.start_time, end_time=self.end_time, num=i * 5000)
                 TidbConn.exec_sql(self.conn, sql)
                 TidbConn.exec_sql(self.conn, sql)
                 self.conn.commit()
                 self.conn.commit()
-                return 0
+            return 0
         except Exception as e:
         except Exception as e:
             logging.error(e)
             logging.error(e)
             return -1
             return -1

+ 1 - 1
Apietl/kwai_etl/report/MateirialVideoDailyReport.py

@@ -274,7 +274,7 @@ from media_api.kuaishou_material_video_report_daily report
                     start_time=self.start_time, end_time=self.end_time, num=i * 5000)
                     start_time=self.start_time, end_time=self.end_time, num=i * 5000)
                 TidbConn.exec_sql(self.conn, sql)
                 TidbConn.exec_sql(self.conn, sql)
                 self.conn.commit()
                 self.conn.commit()
-                return 0
+            return 0
         except Exception as e:
         except Exception as e:
             logging.error(e)
             logging.error(e)
             return -1
             return -1

+ 1 - 1
Apietl/kwai_etl/report/MateirialVideoHourlyReport.py

@@ -274,7 +274,7 @@ from media_api.kuaishou_material_video_report_hourly report
                     start_time=self.start_time, end_time=self.end_time, num=i * 5000)
                     start_time=self.start_time, end_time=self.end_time, num=i * 5000)
                 TidbConn.exec_sql(self.conn, sql)
                 TidbConn.exec_sql(self.conn, sql)
                 self.conn.commit()
                 self.conn.commit()
-                return 0
+            return 0
         except Exception as e:
         except Exception as e:
             logging.error(e)
             logging.error(e)
             return -1
             return -1

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

@@ -209,7 +209,7 @@ class UnitDailyReport:
                     format(start_time=self.start_time, end_time=self.end_time, num=i * 5000)
                     format(start_time=self.start_time, end_time=self.end_time, num=i * 5000)
                 TidbConn.exec_sql(self.conn, sql)
                 TidbConn.exec_sql(self.conn, sql)
                 self.conn.commit()
                 self.conn.commit()
-                return 0
+            return 0
         except Exception as e:
         except Exception as e:
             logging.error(e)
             logging.error(e)
             return -1
             return -1

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

@@ -213,7 +213,7 @@ class UnitHourlyReport:
                     format(start_time=self.start_time, end_time=self.end_time,num=i * 5000)
                     format(start_time=self.start_time, end_time=self.end_time,num=i * 5000)
                 TidbConn.exec_sql(self.conn, sql)
                 TidbConn.exec_sql(self.conn, sql)
                 self.conn.commit()
                 self.conn.commit()
-                return 0
+            return 0
         except Exception as e:
         except Exception as e:
             logging.error(e)
             logging.error(e)
             return -1
             return -1