Check Your Knowledge
Test your understanding of CDC architecture, Auto Loader schema evolution, AUTO CDC for SCD Type 2, and data contracts before moving on.
- In the Databricks-native CDC chain, what plays the role that a hand-written
MERGE INTOplus effective-dating logic played in a legacy warehouse?- A. Auto Loader
- B.
AUTO CDCinside a Lakeflow Declarative Pipeline - C. Unity Catalog
- D.
OPTIMIZE
- By default, how does Auto Loader infer types for loosely typed formats like JSON and CSV?
- A. It always infers the most specific type it can detect
- B. It defaults every column to
STRINGunless overridden with schema hints - C. It refuses to infer a schema and requires one to be supplied manually
- D. It infers types only from the first row of the first file
- Which
cloudFiles.schemaEvolutionModesetting causes a new, unrecognized column to be silently dropped with no failure and no rescue?- A.
addNewColumns - B.
failOnNewColumns - C.
rescue - D.
none
- A.
- Under the default
addNewColumnsevolution mode, what happens the first time Auto Loader encounters a genuinely new column?- A. The new column is silently dropped
- B. The stream fails once, the schema is updated, and a restart resumes processing with the new column included
- C. The entire pipeline is rolled back to its last checkpoint
- D. The new column is routed to a
_rescued_datacolumn and processing continues uninterrupted
- In an
AUTO CDCflow configured withstored_as_scd_type="2", what do the generated__START_ATand__END_ATcolumns represent?- A. The first and last time the pipeline itself ran
- B. The validity window of each historical version of a row, with
__END_AT IS NULLmarking the current version - C. The retry window Databricks uses before failing a flow
- D. The schema inference sample window Auto Loader used
- Why does
sequence_bymatter toAUTO CDC’s correctness?- A. It determines the cluster size used to process the flow
- B. It ensures changes are applied in the correct logical order even if they arrive out of order due to network retries or partition skew
- C. It sets the retention period for historical SCD Type 2 versions
- D. It is required only for
SCD TYPE 1, notSCD TYPE 2
- What is the key difference between
expect_or_dropandexpect_or_failas data-contract enforcement operators?- A.
expect_or_drophalts the pipeline;expect_or_failonly logs a warning - B.
expect_or_dropremoves the failing row and keeps the pipeline running;expect_or_failstops the pipeline and rolls back the update - C. They behave identically but apply to different table types
- D.
expect_or_failcan only be used on gold-layer tables
- A.
- In the schema-drift incident where
cloudFiles.schemaEvolutionModewas set tononeand no contract enforcedNOT NULLon the business key, why did the silver dimension accumulate phantom SCD Type 2 versions instead of simply missing data?- A.
AUTO CDCretried every failed row automatically, each retry creating a new version - B. Every incoming row had a
NULLbusiness key, and sinceNULLnever equalsNULLin the merge-key comparison, each row was treated as a new, unmatched key rather than an update - C. The gold layer aggregated the same customer multiple times due to a
JOINerror - D. Auto Loader re-ingested the same files repeatedly
- A.
- What is the core architectural problem with the direct-to-silver anti-pattern (pointing
AUTO CDCstraight at a raw source stream with no bronze table)?- A. It uses more storage than a layered design
- B. It removes the durable, replayable checkpoint and the natural place to attach a data contract, collapsing ingestion and transformation into one failure domain
- C. It is not supported by Lakeflow Declarative Pipelines and will fail to deploy
- D. It prevents
AUTO CDCfrom supportingSCD TYPE 2
- In the bronze contract template, which three conditions are treated as non-negotiable
expect_or_failchecks for virtually any CDC source?- A. Order total non-negative, status code in a fixed enum, and email format valid
- B. Business key not null, operation code recognized, and sequencing column not null
- C. File size under a threshold, partition count fixed, and cluster size sufficient
- D. Schema hints present, checkpoint location set, and trigger interval configured
Answer Key
- B –
AUTO CDC(formerlyAPPLY CHANGES) inside a Lakeflow Declarative Pipeline replaces the hand-writtenMERGE INTOand effective-dating logic a legacy team maintained manually. - B – Auto Loader defaults loosely typed formats to
STRINGfor every column, deliberately conservative unless overridden withcloudFiles.schemaHints. - D –
nonemode ignores new columns entirely: no failure, no rescue, and the column is silently dropped. - B – The default
addNewColumnsmode fails the stream once when it sees a new column, then resumes with the updated schema on restart. - B –
__START_ATand__END_ATmark each historical version’s validity window; aNULL__END_ATidentifies the current version. - B –
sequence_bytellsAUTO CDCwhich column determines logical ordering, so out-of-order delivery doesn’t apply an older change over a newer one. - B –
expect_or_dropquarantines the failing row and keeps running;expect_or_failstops the pipeline and rolls back the update entirely. - B – With the business key dropped to
NULLfor every row,AUTO CDC’s merge-key comparison treated every row as unique (sinceNULLnever equalsNULL), opening a new phantom version on each micro-batch instead of updating existing rows. - B – Skipping bronze removes the replayable raw copy and the natural attachment point for a contract, so ingestion and transformation failures become indistinguishable and unrecoverable from within Databricks alone.
- B – A non-null business key, a recognized operation code, and a non-null sequencing column are the three structural checks
AUTO CDCdepends on regardless of source; everything else is source-specific.
| ← Previous: Anti-Pattern: Direct-to-Silver and the Contract Template | Next: The Reconciliation Stack: Proving Semantic Parity → | |:—|—:|