actually fix the data and write it out
fix up the sql code and add the load-in code