Closed MaximMoinat closed 2 years ago
This error occurs when running the baseline_to_condition_occurrence
transformation in df = source.get_csv_as_df(apply_dtypes=False, usecols=['eid', '40000-0.0', '40002-0.0'])
. The field 40002-0.0
is missing, this is solved in another update #358
@Anne0507 But why does the ETL stop? It should log the error and continue with the next transformation,
@MaximMoinat @SofiaMp I asked @Spayralbe how this works. Delphyne has a try/except clause for commiting a session (like inserting data), but not for the data processing steps beforehand (like the use of columns in the transformation that are not there). For this case it is solved, if we don't want the pipeline to stop we can add a try/except around the transformation itself like this example for the loading of custom vocabularies.
try:
self.vocab_manager.load_custom_vocab_and_stcm_tables()
except Exception as e:
logger.warning(f'Custom vocabulary and STCM loading failed: {e.message}')
I see, thanks for looking into this. We can close this issue.
In 2022-03 run this ValueError in
baseline_to_condition_occurrence
stops the ETL. Expected behaviour is that only the transformation fails, but rest of the ETL continues.