mapping for converting mysql output to csv format