SpinTheMic
Pro

Interview practice question

Duplicates despite a primary key

Data Engineering · Redshift · Beginner

You declared a primary key on a Redshift table, but you're finding duplicate rows. Why?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Redshift doesn't enforce primary keys.
  • Loads appended the same data twice, maybe from reruns.
  • Deduplicate using ROW_NUMBER and rebuild or delete.
  • Make loads idempotent with MERGE or delete-insert.
  • Add uniqueness checks in the pipeline.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics