Epoch to timeformat ‘YYYY-MM-DD HH:MI:SS’ while redshift copy

Question:

Is there any way to format the epoch to timeformat ‘YYYY-MM-DD HH:MI:SS’ while
doing redshift copy from s3 to redshift using COPY command

Answer:

You can use redshift COPY command with parameter TIMEFORMAT 'epochsecs'
or TIMEFORMAT 'epochmillisecs'
Check redshift documentation for more details

Leave a Reply