def compute(self): self.check_input('csvFile') self.check_input('dbEntry') csv_file = self.get_input('csvFile') db_entry = self.get_input('dbEntry') if csv_file.file_entry.TargetTable.upper() == 'P2DETECTION': self.annotate({'used_tables': str([(db_entry.db_entry.ConnectionString, db_entry.db_entry.DBName, csv_file.file_entry.TargetTable)])}) res = LoadAppLogic.IsMatchTableColumnRanges(db_entry.db_entry, csv_file.file_entry) self.set_output('rangesMatch', res)
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)