def transform_canonical_to_model(progoasisid, sourcefilename, validationfilelocname, transformationfilename, destinationfilepath, destinationfilename): ''' Transform canonical to model. ''' do_sequence = False trasform_status = _do_transform(progoasisid, sourcefilename, validationfilelocname, transformationfilename, destinationfilepath, destinationfilename, do_sequence) if trasform_status is False: flamingo_db_utils.update_progoasis_status(progoasisid, "Failed")
def do_load_programme_model(progoasisid): ''' Load programme model. ''' try: row = flamingo_db_utils.get_transform_file_names_progoasis(progoasisid) extension = flamingo_db_utils.get_model_file_extension(progoasisid) ts = values.get_timestamp() dest_file_path = str(FILES_DIRECTORY) + "/APIInput/" destinationfile = "ModelLocProgOasis" + str(progoasisid) + "_" + str( ts) + "." + str(extension[0]) transform_canonical_to_model(progoasisid, row[0], row[1], row[2], dest_file_path, destinationfile) flamingo_db_utils.generate_output_transform_file_records_for_progoasis( progoasisid, destinationfile) do_call_keys_service(progoasisid) do_generate_oasis_files(progoasisid) except: logging.getLogger().exception("Error in do_load_programme_model") flamingo_db_utils.update_progoasis_status(progoasisid, "Failed")