Exemple #1
0
 def compute(self):
     self.check_input('csvFile')
     self.check_input('dbEntry')
     csv_file = self.get_input('csvFile')
     db_entry = self.get_input('dbEntry')
     self.annotate({'used_tables':
                        str([(db_entry.db_entry.ConnectionString, 
                              db_entry.db_entry.DBName,
                              csv_file.file_entry.TargetTable)])})
     res = LoadAppLogic.IsMatchTableRowCount(db_entry.db_entry,
                                             csv_file.file_entry)
     self.set_output('countsMatch', res)
Exemple #2
0
 def compute(self):
     self.check_input('csvFile')
     self.check_input('dbEntry')
     csv_file = self.get_input('csvFile')
     db_entry = self.get_input('dbEntry')
     self.annotate({'used_tables':
                        str([(db_entry.db_entry.ConnectionString, 
                              db_entry.db_entry.DBName,
                              csv_file.file_entry.TargetTable)])})
     if not LoadAppLogic.UpdateComputedColumns(db_entry.db_entry,
                                               csv_file.file_entry):
         raise ModuleError(self, "UpdateComputedColumns failed")
     if not LoadAppLogic.IsMatchTableRowCount(db_entry.db_entry,
                                              csv_file.file_entry):
         raise ModuleError(self, "IsMatchTableRowCount failed")
     if not LoadAppLogic.IsMatchTableColumnRanges(db_entry.db_entry,
                                                  csv_file.file_entry):
         raise ModuleError(self, "IsMatchTableColumnRanges failed")
     self.set_output('dbEntry', db_entry)