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?

專家
已提問 6 年前檢視次數 1698 次
1 個回答
0
已接受的答案

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/

管理員
已回答 6 年前
profile picture
專家
已審閱 10 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南