Sample question 1
advancedDomain 1, objective 7Billing and CRM systems both write change records for a customers table into one feed that an AUTO CDC flow applies to an SCD Type 1 target. Each record has customer_id, seq, every data column, and changed_cols, an array<string> that names the columns this record intends to change. Columns not named in changed_cols hold null placeholders. Some records deliberately set phone to null, and the target must store that null. Each producer adds new columns over time. Which configuration applies these records correctly?
Choose one answer.
- Option A:
ignore_null_updates=True, so every null in a change record leaves the existing target value in place - Option B:
ignore_null_updates_column_listnaming the columns that exist today - Option C:
columns_to_updatepointing atchanged_cols, combined withignore_null_updates=Trueas a safeguard - Option D:
columns_to_update="changed_cols"
Show answer and explanation for sample question 1
Correct answer: D
Why
When a source sends only the columns that changed, AUTO CDC must tell an absent column from an explicit null. IGNORE NULL UPDATES treats nulls as do-not-update markers for the columns it covers, which suits a fixed, known set of columns. COLUMNS TO UPDATE (columns_to_update in Python) reads an array of column names from each change record, writes those columns including explicit nulls, and preserves the rest, so it fits records that update different columns. The two mechanisms cannot be combined.
Every option
- A(incorrect)
This treats every null as a do-not-update marker, so it can never store the deliberate null for
phone. It solves the placeholder problem but breaks the explicit-null requirement. - B(incorrect)
Listed columns ignore nulls, so
phonecould never be nulled if listed, and columns outside the list apply explicit nulls, so placeholders would overwrite stored values. A fixed list also needs a code change whenever a producer adds a column. - C(incorrect)
columns_to_updatecannot be set together withignore_null_updatesor its column-list variants, so this combination is not allowed. - D(correct)
Correct. Each record names the columns to write, including explicit nulls, and every unlisted column keeps its target value. It suits changing sets of updated columns across producers.