MySQL to Redshift conversion script