How to do s3 copy to AWS Redshift for Timestamp Data.

Quick note, might save some headaches to future me.

        COPY {name}
        FROM 's3://{bucket_name}/data-{name}'
        credentials 'aws_access_key_id={AWS_ACCESS_KEY};aws_secret_access_key={AWS_SECRET_KEY}'
        CSV IGNOREHEADER as 1
        GZIP
        DATEFORMAT as 'auto' ACCEPTANYDATE ;

The trick is to use DATEFORMAT as 'auto' ACCEPTANYDATE

Show Comments