Skip to content
RevOps Agentified

Amazon Redshift

Stage a Redshift merge, pick one row per account revision and verify that unrelated target duplicates stay visible.

Approve one source row per account before a merge
Stage source rows
Account A has revisions 22 and 23.
Approve a winner
Choose revision 23 and flag unresolvable ties.
Verify target
Account A updates, account B inserts and unrelated duplicates remain visible.

An inbound file has two revisions for one CRM account and a new record for another. If both revisions are merged directly, one target row can match twice. In Amazon Redshift, validate a staging table before applying updates to the reporting copy.

Choose one staged row per target business key

Load the file into a temporary staging table, then build a merge input with a deterministic winner per key. Use the latest verified source revision. Hold tied revisions with conflicting values for review. Check the target’s key counts as well. Use a matching distribution key for the staging and target tables where appropriate for the workload, and verify the query plan.

In the example, account A appears as revision 22 and revision 23. Keep revision 23 for the upsert. Account B is new and has one row. Redshift’s simplified REMOVE DUPLICATES form requires compatible table shape and removes matched duplicates on the destination. It does not repair unrelated duplicate destination keys, so scope any cleanup separately.

Approve the stage before applying the merge

Staging and target checks for a two-account batch
CheckExpected resultDecision
Input staging groupOne candidate per account for the merge.Keep revision 23 for A and reject an unresolved conflicting tie.
Test mergeA updates to revision 23 and B is inserted once.Read both target rows and confirm the expected amounts or statuses.
Destination uniqueness checkUnrelated duplicate keys are visible as separate findings.Keep a list of duplicates that did not match this batch for steward review.

Confirm one more run leaves the two intended records at the same values and keys. Use the integration guide to decide which revision is authoritative before running a bulk retry.

Test the Amazon Redshift example

Use these inputs to predict the result. Check your answer against the guide.

Check
Destination uniqueness check
Check the expected result
Expected result
Unrelated duplicate keys are visible as separate findings.
Decision
Keep a list of duplicates that did not match this batch for steward review.

Compare with another case

Check
Input staging group
Expected result
One candidate per account for the merge.

GTM Systems Academy newsletter

Get guides to CRM ownership, integrations, and migrations, with checks to run before you change your stack.