You receive data from an external API with an unstable structure. What would you do in preprocessing so that the entire pipeline does not crash?
So‘rovnoma
- I write a schema-validator with default values and logging
- I wrap parsing in try/except with sending alerts in case of anomalies
- I save “raw” data separately so that it can be re-parsed during revision
- I make mapping API → internal schema via an adapter or ETL layer