Question 1
Topic: Developing Code for Data Processing using Python and SQL
Skill tested: Implementing Lakeflow Declarative Pipelines SCD Type 2 processing with stored_as_scd_type.
A retailer receives a continuously updated customer CDC stream containing a stable customer key, an operation field, source commit sequence, and customer attributes. The source can emit multiple changes for a customer, including deletes, between pipeline updates. The team wants a current-and-historical Delta target with effective history maintained by the pipeline's SCD Type 2 support; it must not implement custom MERGE logic. Which design best satisfies the requirement? Select TWO.
SCD Type 2 requires a stable business key and deterministic sequencing so changes for the same entity are applied in source order. A Lakeflow Declarative Pipelines change flow can use the SCD Type 2 storage behavior and the source sequencing column, while delete events must be represented using the change-flow semantics so the target history reflects deletion correctly. Type 1 overwrites history, and periodic backups are not row-level effective history. A materialized view does not infer entity identity without a key. Keeping only an arbitrary latest row before processing can discard intermediate changes and produces incorrect history.