Procházet zdrojové kódy

Add work around for missing columns that have already been dropped in an earlier stage, for method _filter_invalid_data

ogert před 5 roky
rodič
revize
45de2f12c9
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      cdplib/db_migration/MigrationCleaning.py

+ 2 - 0
cdplib/db_migration/MigrationCleaning.py

@@ -235,7 +235,9 @@ class MigrationCleaning:
 
             if len(columns) > 0:
                 columns_not_in_data = [column for column in columns if column not in data.columns]
+                print('THESE ARE ALL COLUMNS THAT WAS MISSING', columns_not_in_data)
                 data_inconsist[columns_not_in_data] = 'Column does not exist in the mongo database and has therefore been dropped'
+                print('THIS ARE THE COLUMNS IN INCONSIST DATA:', data_inconsist.columns)
                 data_inconsist = data_inconsist[columns]
 
         db.append_to_table(data=data_inconsist,