easyMultiple ChoiceObjective-mapped
DP-203 Practice Question: A data processing job in Azure Synapse Analytics…
A data processing job in Azure Synapse Analytics writes results to a table in the dedicated SQL pool. After a failure, the job restarts from the beginning, causing duplicates. Which design pattern should you implement to ensure idempotent writes?
⚠ Common exam trap
A common mix-up: candidates choose MERGE (Option B) thinking it inherently provides idempotency, but they overlook that MERGE in Synapse dedicated SQL pool is not atomic across retries and can still cause duplicates if the job fails after partial execution, whereas partition switching provides true atomic replacement.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use a staging table and then swap partitions with the target table.
Using a staging table with partition swapping ensures idempotent writes by atomically replacing the target partition with a fully loaded staging partition. This avoids duplicates even if the job restarts, as the swap operation is transactional and the staging table can be truncated before each run. In Azure Synapse dedicated SQL pool, partition switching is a metadata-only operation that provides consistency without data movement.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use a TRUNCATE statement before each insert.
Why it's wrong here
Not atomic; duplicates can occur if job fails after truncate.
- ✗
Use a MERGE statement with a unique key to upsert data.
Why it's wrong here
May still cause duplicates if source has same key multiple times.
- ✓
Use a staging table and then swap partitions with the target table.
Why this is correct
Atomic swap ensures idempotency.
- ✗
Use CREATE TABLE AS SELECT (CTAS) with a unique constraint.
Why it's wrong here
CTAS doesn't handle restarts well.
Go deeper
Related to this question
About these practice questions
One of 760 original DP-203 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DP-203 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-203 exam.