SpinTheMic
Pro

Interview practice question

Applying CDC with deletes

Data Engineering · Snowflake · Intermediate

You receive CDC records with an operation column of I, U and D from a source database. How do you apply them to a Snowflake table?

What a strong answer covers

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

  • Deduplicate to the latest change per key using the CDC sequence or timestamp.
  • Use one MERGE with WHEN MATCHED AND op = 'D' THEN DELETE.
  • WHEN MATCHED AND op IN ('U','I') THEN UPDATE.
  • WHEN NOT MATCHED AND op != 'D' THEN INSERT.
  • Keep raw CDC history in bronze for audit and replay.
Practise this topic

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

See all topics