SpinTheMic
Pro

Interview practice question

Dimension rebuild changed all surrogate keys

Data Engineering · Data Warehousing · Intermediate

A dimension table was rebuilt from scratch, generating new surrogate keys, and now facts point to the wrong dimension rows. How do you fix it and prevent it?

What a strong answer covers

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

  • Sequence-based surrogate keys change when a table is rebuilt.
  • Facts loaded earlier still hold the old keys.
  • Restore the old key mapping or reload facts with new keys.
  • Use stable keys, like hashes of business keys, or preserve key assignments.
  • Never truncate-and-reload dimensions with generated sequences.
Practise this topic

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

See all topics