Pārlūkot izejas kodu

delete code Goods Erro rows

huangyifan 11 mēneši atpakaļ
vecāks
revīzija
d05d90c0a3
1 mainītis faili ar 14 papildinājumiem un 14 dzēšanām
  1. 14 14
      start_sync_amz_RightNowRun.py

+ 14 - 14
start_sync_amz_RightNowRun.py

@@ -91,22 +91,22 @@ if __name__ == '__main__':
 
     refresh_token = shop_infos(AWS_CREDENTIALS['profile_id'])['refresh_token']
     AWS_CREDENTIALS['refresh_token'] = refresh_token
-    # amz_report(conn, AWS_CREDENTIALS=AWS_CREDENTIALS)
+    amz_report(conn, AWS_CREDENTIALS=AWS_CREDENTIALS)
 
-    list_date = ["2024-03-23",]
+    # list_date = ["2024-03-23",]
     # list_date = [f'2024-04-{"0"+str(i) if len(str(i))==1 else i}' for i in range(10,11)]
-    print(list_date)
-    count = 1
-    for date_ in list_date:
-        # if count==1:
-        #     conn.command(f"delete from AmazonReport.SD_advertiser_sdAdvertisedProductV3 where date='{date_}'")
-        #     conn.command(f"delete from AmazonReport.SD_asin_sdPurchasedProductV3 where date='{date_}'")
-        #conn.command(f"delete from AmazonReport.SB_sbPurchasedProduct_asinV3 where date='{date_}'")
-        print(date_)
-        print(date_.replace("-",""))
-        amz_report(conn,AWS_CREDENTIALS,para={"startDate":date_,"endDate":date_,"date":date_.replace("-","")})
-        time.sleep(5)
-        count+=1
+    # print(list_date)
+    # count = 1
+    # for date_ in list_date:
+    #     # if count==1:
+    #     #     conn.command(f"delete from AmazonReport.SD_advertiser_sdAdvertisedProductV3 where date='{date_}'")
+    #     #     conn.command(f"delete from AmazonReport.SD_asin_sdPurchasedProductV3 where date='{date_}'")
+    #     #conn.command(f"delete from AmazonReport.SB_sbPurchasedProduct_asinV3 where date='{date_}'")
+    #     print(date_)
+    #     print(date_.replace("-",""))
+    #     amz_report(conn,AWS_CREDENTIALS,para={"startDate":date_,"endDate":date_,"date":date_.replace("-","")})
+    #     time.sleep(5)
+    #     count+=1
 
     conn.close()