The fundamental relationships between the entities of interest in scientific data are very complex. There are many of types of entities that need to be tracked, and the relations between these entities are oftentimes many-to-many. There is also a great deal of meta-data that needs to be stored and formally linked to the data. This makes the FAIR principles of rich meta-data and strong provenance challenging to achieve. A database architecture capable of capturing this complexity requires many tables and foreign keys. Accordingly, the ETL pipeline that populates such a database is a fairly complex piece of software. As with any complex piece of software, maintainability is crucial, and making the code modular and easy to debug is imperative for maintainability.