Overwrite content in Redshift using Glue

0

I have a customer who wants to overwrite a table in Redshift in a Glue job.

After looking, there does not seem to be a mode=overwrite option in Glue DynamicFrameWriter at the moment.

What workarounds could the customer use for this?

EXPERT
asked 6 years ago1649 views
1 Answer
0
Accepted Answer

If you mean upsert, there is a workaround solution, have glue insert all rows into a staging table and then perform a upsert/merge outside of glue.

Use a Staging Table to Perform a Merge (Upsert), https://docs.aws.amazon.com/redshift/latest/dg/c_best-practices-upsert.html

There is also a big data blog talking about upsert into Amazon Redshift using AWS Glue and SneaQL, I haven't tried, however, sounds cool to give a go. https://aws.amazon.com/blogs/big-data/upsert-into-amazon-redshift-using-aws-glue-and-sneaql/

MODERATOR
answered 6 years ago
profile picture
EXPERT
reviewed 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions