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?

ESPERTO
posta 6 anni fa1700 visualizzazioni
1 Risposta
0
Risposta accettata

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/

MODERATORE
con risposta 6 anni fa
profile picture
ESPERTO
verificato 10 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande