Designing ETL error trapping and detection routines