Interview practice question
Duplicate records written to the warehouse
Data Engineering · AWS Lambda · Intermediate
A Lambda processing order events writes duplicate rows into a staging table when retries happen. How do you make it safe?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Retries and at-least-once delivery cause duplicates.
- Use an idempotency key like order event ID.
- Track processed IDs in DynamoDB with conditional writes or use Powertools idempotency.
- Load with MERGE or upsert on the key.
- Add dedup checks downstream.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.