Suppose I run the Redshift COPY command for a table where existing data. Then does the command:
The COPY command always appends data to a table.
In order to effectively upsert in Redshift using "copy" command, you need first to load your data (from your copy) to a staging table then run some sql on redshift to process this data.
AWS have documented an approach here https://docs.aws.amazon.com/redshift/latest/dg/t_updating-inserting-using-staging-tables-.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With