def compute(self): self.check_input('csvFile') csv_file = self.get_input('csvFile') self.annotate({'used_files': str([csv_file.file_entry.HeaderPath])}) res = LoadAppLogic.ReadCSVFileColumnNames(csv_file.file_entry) self.set_output('csvFile', CSVFileEntry(res))
def compute(self): self.checkInputPort('csvFile') csv_file = self.getInputFromPort('csvFile') if not LoadAppLogic.IsExistsCSVFile(csv_file.file_entry): raise ModuleError(self, "IsExistsCSVFile failed") self.annotate({'used_files': str([csv_file.file_entry.HeaderPath])}) csv_file.file_entry = \ LoadAppLogic.ReadCSVFileColumnNames(csv_file.file_entry) if not LoadAppLogic.IsMatchCSVFileColumnNames(csv_file.file_entry): raise ModuleError(self, "IsMatchCSVFileColumnNames failed") self.setResult('csvFile', csv_file)