working version for copying from redshift to rds