QuestionQ73

VerifiedData Operations and Support

A company uses Amazon Redshift to store order transactions for the current day. The company has an orders table that contains prior order data. The company also has a staging table that holds new or updated order records.

The company must remove stale records from the orders table and insert the most recent data from the staging table into the orders table. Several downstream applications require the orders table to show up-to-date information.

Which solution meets these requirements?

Explanation

Amazon Redshift stored procedures can execute data-modification statements, including DELETE and INSERT. A stored procedure can delete obsolete rows from the target table and insert the new or updated staging rows in a controlled transaction, so consumers see a consistently refreshed orders table. AWS documents the staging-table approach as deleting replaced target rows and inserting replacement rows from the staging table.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!