|  | @@ -246,6 +246,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          print("func_name:","reportV3_campaign_spCampaignsETL",'\n',"table_name:","SP_spCampaigns_campaignV3")
 | 
	
		
			
				|  |  |          if len(conn.query_df(f"select * from AmazonReport.SP_spCampaigns_campaignV3 where date='{params['startDate']}'"))>0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          params['reportType'] = "spCampaigns"
 | 
	
	
		
			
				|  | @@ -274,7 +275,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, params['columns'], timeZone_, extra_columns=[])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SP_spCampaigns_campaignV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SP_spCampaigns_campaignV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[params['columns']]
 | 
	
	
		
			
				|  | @@ -288,6 +289,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SP_spCampaigns_adGroupV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "spCampaigns"
 | 
	
		
			
				|  |  |          params['columns'] = [
 | 
	
	
		
			
				|  | @@ -315,7 +317,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, params['columns'], timeZone_, extra_columns=[])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SP_spCampaigns_adGroupV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SP_spCampaigns_adGroupV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[params['columns']]
 | 
	
	
		
			
				|  | @@ -330,6 +332,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SP_spCampaigns_placementV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['columns'] = [
 | 
	
		
			
				|  |  |              'placementClassification','campaignName', 'campaignId','campaignStatus',  'campaignBudgetAmount', 'campaignBudgetType',
 | 
	
	
		
			
				|  | @@ -358,7 +361,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, params['columns'], timeZone_, extra_columns=[])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SP_spCampaigns_placementV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SP_spCampaigns_placementV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -374,6 +377,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SP_spTargeting_targetingV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['columns'] = [
 | 
	
		
			
				|  |  |              'adKeywordStatus',
 | 
	
	
		
			
				|  | @@ -403,7 +407,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, params['columns'], timeZone_, extra_columns=[])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SP_spTargeting_targetingV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SP_spTargeting_targetingV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -418,6 +422,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SP_spSearchTerm_searchTermV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "spSearchTerm"
 | 
	
		
			
				|  |  |          params['columns'] = [
 | 
	
	
		
			
				|  | @@ -448,7 +453,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, params['columns'], timeZone_, extra_columns=[])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SP_spSearchTerm_searchTermV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SP_spSearchTerm_searchTermV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -463,6 +468,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SP_spAdvertisedProduct_advertiserV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "spAdvertisedProduct"
 | 
	
		
			
				|  |  |          params['columns'] = [
 | 
	
	
		
			
				|  | @@ -494,7 +500,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SP_spAdvertisedProduct_advertiserV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SP_spAdvertisedProduct_advertiserV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -510,6 +516,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |              if len(conn.query_df(
 | 
	
		
			
				|  |  |                      f"select * from AmazonReport.SP_spPurchasedProduct_asinV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |                  logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +                time.sleep(5)
 | 
	
		
			
				|  |  |                  return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "spPurchasedProduct"
 | 
	
		
			
				|  |  |          params['columns'] = [
 | 
	
	
		
			
				|  | @@ -539,7 +546,7 @@ class SP_ETL(SPClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # df_report.to_excel('ATEST.xlsx')
 | 
	
		
			
				|  |  |          if params.get('Download') in [None, False]:
 | 
	
		
			
				|  |  |              conn.insert_df("AmazonReport.SP_spPurchasedProduct_asinV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -            time.sleep(0.05)
 | 
	
		
			
				|  |  | +            time.sleep(1.05)
 | 
	
		
			
				|  |  |              print("插入完成SP_spPurchasedProduct_asinV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -603,6 +610,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_sbCampaigns_campaignV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sbCampaigns" #sbCampaigns
 | 
	
		
			
				|  |  |          params['columns'] = ['campaignName','campaignId','campaignStatus',
 | 
	
	
		
			
				|  | @@ -630,7 +638,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_sbCampaigns_campaignV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_sbCampaigns_campaignV3")
 | 
	
		
			
				|  |  |          df_rel =  df_report[params['columns']]
 | 
	
		
			
				|  |  |          return df_rel
 | 
	
	
		
			
				|  | @@ -644,6 +652,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_sbAdGroup_adGroupV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sbAdGroup" #sbCampaigns
 | 
	
		
			
				|  |  |          params['columns'] = ['campaignName','campaignId','campaignBudgetCurrencyCode','adGroupName','adGroupId', 'impressions',  'clicks', 'cost',
 | 
	
	
		
			
				|  | @@ -666,7 +675,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_sbAdGroup_adGroupV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_sbAdGroup_adGroupV3")
 | 
	
		
			
				|  |  |          df_rel =  df_report[params['columns']]
 | 
	
		
			
				|  |  |          return df_rel
 | 
	
	
		
			
				|  | @@ -680,6 +689,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_sbCampaigns_placementV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sbCampaignPlacement" #sbCampaigns
 | 
	
		
			
				|  |  |          params['columns'] = ['placementClassification','campaignName','campaignId','campaignStatus','campaignBudgetAmount','campaignBudgetType','campaignBudgetCurrencyCode',
 | 
	
	
		
			
				|  | @@ -703,7 +713,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_sbCampaigns_placementV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_sbCampaigns_placementV3")
 | 
	
		
			
				|  |  |          df_rel =  df_report[params['columns']]
 | 
	
		
			
				|  |  |          return df_rel
 | 
	
	
		
			
				|  | @@ -717,6 +727,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_sbTargeting_targetingV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sbTargeting" #sbCampaigns
 | 
	
		
			
				|  |  |          params['columns'] = [
 | 
	
	
		
			
				|  | @@ -742,7 +753,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_sbTargeting_targetingV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_sbTargeting_targetingV3")
 | 
	
		
			
				|  |  |          df_rel =  df_report[params['columns']]
 | 
	
		
			
				|  |  |          return df_rel
 | 
	
	
		
			
				|  | @@ -756,6 +767,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_sbSearchTerm_searchTermV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sbSearchTerm" #sbCampaigns
 | 
	
		
			
				|  |  |          params['columns'] = [
 | 
	
	
		
			
				|  | @@ -776,7 +788,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_sbSearchTerm_searchTermV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_sbSearchTerm_searchTermV3")
 | 
	
		
			
				|  |  |          df_rel =  df_report[params['columns']]
 | 
	
		
			
				|  |  |          return df_rel
 | 
	
	
		
			
				|  | @@ -790,6 +802,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_sbAds_adsV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sbAds" #sbCampaigns
 | 
	
		
			
				|  |  |          params['columns'] = [
 | 
	
	
		
			
				|  | @@ -817,7 +830,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_sbAds_adsV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_sbAds_adsV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[params['columns']]
 | 
	
	
		
			
				|  | @@ -832,6 +845,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_sbPurchasedProduct_asinV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sbPurchasedProduct"
 | 
	
		
			
				|  |  |          params['columns'] = [
 | 
	
	
		
			
				|  | @@ -853,7 +867,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report[df_report.select_dtypes(["string"]).columns] = df_report[df_report.select_dtypes(["string"]).columns].fillna('')
 | 
	
		
			
				|  |  |          # print(df_report)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_sbPurchasedProduct_asinV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_sbPurchasedProduct_asinV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -869,6 +883,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_campaignsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'campaigns'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -892,7 +907,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=[])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_campaignsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_campaignsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -908,6 +923,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_campaignsVideoV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'campaigns'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -933,7 +949,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=[])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_campaignsVideoV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_campaignsVideoV2")
 | 
	
		
			
				|  |  |          # print(df_report[metric].info())
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -949,6 +965,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_campaignsPlacementV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'campaigns'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -970,7 +987,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['placement'])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_campaignsPlacementV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_campaignsPlacementV2")
 | 
	
		
			
				|  |  |          # print(df_report[metric].info())
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -985,6 +1002,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_campaignsPlacementVideoV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'campaigns'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1009,7 +1027,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_campaignsPlacementVideoV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_campaignsPlacementVideoV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1024,6 +1042,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_adGroupsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'adGroups'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1047,7 +1066,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_adGroupsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_adGroupsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1063,6 +1082,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_adGroupsVideoV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          metric = [
 | 
	
		
			
				|  |  |                  'campaignId','campaignName','adGroupId','adGroupName','impressions','clicks','cost',
 | 
	
	
		
			
				|  | @@ -1085,7 +1105,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_adGroupsVideoV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_adGroupsVideoV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -1099,6 +1119,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_targetsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'targets'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1122,7 +1143,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_targetsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_targetsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1137,6 +1158,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_targetsVideoV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'targets'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1162,7 +1184,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_targetsVideoV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_targetsVideoV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -1176,6 +1198,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_keywordsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'keywords'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1200,7 +1223,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_keywordsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_keywordsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -1214,6 +1237,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_keywordsVideoV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'keywords'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1239,7 +1263,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_keywordsVideoV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_keywordsVideoV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -1253,6 +1277,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_keywordsQueryV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'keywords'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1272,7 +1297,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_keywordsQueryV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_keywordsQueryV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -1286,6 +1311,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_keywordsQueryVideoV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'keywords'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1308,7 +1334,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_keywordsQueryVideoV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_keywordsQueryVideoV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -1322,6 +1348,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_adsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'ads'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1344,7 +1371,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=[])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_adsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_adsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -1358,6 +1385,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SB_adsVideoV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'ads'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1384,7 +1412,7 @@ class SB_ETL(SBClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SB_adsVideoV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SB_adsVideoV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -1436,6 +1464,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_sdCampaigns_campaignV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sdCampaigns"
 | 
	
		
			
				|  |  |          params['columns'] = [ 'campaignName', 'campaignId','campaignStatus','campaignBudgetAmount', 'impressions','clicks', 'cost',
 | 
	
	
		
			
				|  | @@ -1462,7 +1491,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report.columns)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_sdCampaigns_campaignV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_sdCampaigns_campaignV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1477,6 +1506,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_sdCampaigns_campaignMatchedTargetV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sdCampaigns"
 | 
	
		
			
				|  |  |          params['columns'] = [
 | 
	
	
		
			
				|  | @@ -1503,7 +1533,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report.columns)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_sdCampaigns_campaignMatchedTargetV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_sdCampaigns_campaignMatchedTargetV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1518,6 +1548,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_sdAdGroup_adGroupV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sdAdGroup"
 | 
	
		
			
				|  |  |          params['columns'] = ['campaignName','campaignId', 'adGroupName', 'adGroupId', 'impressions','clicks', 'cost',
 | 
	
	
		
			
				|  | @@ -1545,7 +1576,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_sdAdGroup_adGroupV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_sdAdGroup_adGroupV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1560,6 +1591,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_sdAdGroup_adGroupMatchedTargetV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sdAdGroup"
 | 
	
		
			
				|  |  |          params['columns'] = [
 | 
	
	
		
			
				|  | @@ -1587,7 +1619,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_sdAdGroup_adGroupMatchedTargetV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_sdAdGroup_adGroupMatchedTargetV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1602,6 +1634,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_targeting_sdTargetingV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sdTargeting"
 | 
	
		
			
				|  |  |          params['columns'] = ['campaignName', 'campaignId','adGroupName','adGroupId', 'targetingText','targetingId','impressions','clicks', 'cost',
 | 
	
	
		
			
				|  | @@ -1633,7 +1666,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_targeting_sdTargetingV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_targeting_sdTargetingV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1648,6 +1681,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_targeting_sdTargetingMatchedTargetV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sdTargeting"
 | 
	
		
			
				|  |  |          params['columns'] = [
 | 
	
	
		
			
				|  | @@ -1680,7 +1714,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_targeting_sdTargetingMatchedTargetV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_targeting_sdTargetingMatchedTargetV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1695,6 +1729,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_advertiser_sdAdvertisedProductV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sdAdvertisedProduct"
 | 
	
		
			
				|  |  |          params['columns'] = ['campaignName','campaignId','adGroupName','adGroupId','adId','impressions','clicks', 'cost',
 | 
	
	
		
			
				|  | @@ -1724,7 +1759,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_advertiser_sdAdvertisedProductV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_advertiser_sdAdvertisedProductV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1739,6 +1774,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_asin_sdPurchasedProductV3 where date='{params['startDate']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['reportType'] = "sdPurchasedProduct"
 | 
	
		
			
				|  |  |          params['columns'] = ['campaignName','campaignId', 'adGroupName','adGroupId', 'promotedAsin', 'promotedSku',
 | 
	
	
		
			
				|  | @@ -1760,7 +1796,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          # print(df_report)
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_asin_sdPurchasedProductV3", df_report[params['columns']])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_asin_sdPurchasedProductV3")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1792,6 +1828,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_campaignsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'campaigns'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1807,7 +1844,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['tactic'])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_campaignsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_campaignsV2—")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -1821,6 +1858,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_campaignsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'campaigns'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1837,7 +1875,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['tactic'])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_campaignsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_campaignsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -1867,6 +1905,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_adGroupsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'adGroups'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1880,7 +1919,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['tactic'])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_adGroupsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_adGroupsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -1894,6 +1933,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_adGroupsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          params['record_type'] = 'adGroups'
 | 
	
	
		
			
				|  | @@ -1909,7 +1949,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_adGroupsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_adGroupsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -1938,6 +1978,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_adsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'productAds'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1952,7 +1993,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['tactic'])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_adsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_adsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -1966,6 +2007,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_adsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'productAds'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1981,7 +2023,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_adsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_adsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -2010,6 +2052,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_targetsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'targets'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -2024,7 +2067,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['tactic'])
 | 
	
		
			
				|  |  |          # print(df_report[metric].info())
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_targetsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_targetsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -2038,6 +2081,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_targetsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'targets'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -2053,7 +2097,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_targetsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_targetsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -2079,6 +2123,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_asinsV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'asins'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -2093,7 +2138,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['tactic'])
 | 
	
		
			
				|  |  |          # print(df_report.info())
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_asinsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_asinsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -2115,7 +2160,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['tactic'])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_asinsV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_asinsV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -2146,6 +2191,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_campaignsMatchedTargetV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          params['record_type'] = 'campaigns'
 | 
	
	
		
			
				|  | @@ -2162,7 +2208,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['matchedTarget', 'tactic'])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_campaignsMatchedTargetV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_campaignsMatchedTargetV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -2177,6 +2223,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_campaignsMatchedTargetV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'campaigns'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -2191,7 +2238,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['matchedTarget', 'tactic'])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_campaignsMatchedTargetV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_campaignsMatchedTargetV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -2220,6 +2267,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_adGroupsMatchedTargetV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'adGroups'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -2234,7 +2282,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['matchedTarget', 'tactic'])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_adGroupsMatchedTargetV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_adGroupsMatchedTargetV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -2248,6 +2296,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_adGroupsMatchedTargetV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'adGroups'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -2261,7 +2310,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report['tactic'] = 'Audiences targeting'  # {"T00020":"Contextual targeting","T00030":"Audiences targeting"}
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['matchedTarget', 'tactic'])
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_adGroupsMatchedTargetV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_adGroupsMatchedTargetV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -2289,6 +2338,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_targetsMatchedTargetV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'targets'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -2302,7 +2352,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['matchedTarget', 'tactic'])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_targetsMatchedTargetV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_targetsMatchedTargetV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 | 
	
	
		
			
				|  | @@ -2316,6 +2366,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          if len(conn.query_df(
 | 
	
		
			
				|  |  |                  f"select * from AmazonReport.SD_targetsMatchedTargetV2 where date='{params['date']}'")) > 0:
 | 
	
		
			
				|  |  |              logging.info("数据已存在...")
 | 
	
		
			
				|  |  | +            time.sleep(5)
 | 
	
		
			
				|  |  |              return 'Pass'
 | 
	
		
			
				|  |  |          params['record_type'] = 'targets'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -2329,7 +2380,7 @@ class SD_ETL(SDClient, Common_ETLMethod):
 | 
	
		
			
				|  |  |          df_report = self.type_trans(df_report, metric, timeZone_, extra_columns=['matchedTarget', 'tactic'])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          conn.insert_df("AmazonReport.SD_targetsMatchedTargetV2", df_report[metric])
 | 
	
		
			
				|  |  | -        time.sleep(0.05)
 | 
	
		
			
				|  |  | +        time.sleep(1.05)
 | 
	
		
			
				|  |  |          print("插入完成SD_targetsMatchedTargetV2")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          df_rel =  df_report[metric]
 |