A city's 311 Lakeflow Spark Declarative Pipeline must drop tickets whose priority is not in {P1, P2, P3} into quarantine. What should the team configure?
Select an answer to reveal the explanation.
Short Explanation
Think of expectations as the ticket sorter at the service desk—if priority isn't P1–P3, the card goes to the quarantine bin, not the SLA board.
Full Explanation
Lakeflow Spark Declarative Pipeline expectations encode data-quality rules inside the pipeline graph so invalid rows are handled before they reach curated consumers. For a city's 311 service, requiring priority ∈ {P1, P2, P3} and routing failures to quarantine keeps malformed tickets out of silver/gold SLA boards, workload dashboards, and public-facing metrics. The expectation becomes part of the designed refine path rather than an after-the-fact analyst chore, which matches how Domain-style pipeline quality is tested: declare the rule, choose an action (fail, drop, quarantine), and keep good rows flowing.
Adding a SQL CASE mapping to coerce priority values into {P1, P2, P3} while also routing failing rows to quarantine is inconsistent because coercion rewrites invalid priorities so no failures remain to quarantine, which hides malformed tickets and invents a priority instead of preserving the bad rows for remediation. Adding a declarative pipeline expectation using expect or drop on priority in {P1, P2, P3} while also routing failing rows to quarantine mixes exclusive actions because expect-or-drop silently discards invalid rows instead of preserving them in quarantine, so the bad tickets are lost rather than kept for remediation. Adding a declarative pipeline expectation using expect or fail on priority in {P1, P2, P3} while also routing failing rows to quarantine mixes exclusive actions because expect-or-fail halts the entire pipeline on an invalid priority instead of isolating only the failures in quarantine, which blocks valid P1–P3 tickets rather than keeping good rows flowing.
Exam caveat: quarantine (or drop/fail) behavior must match the city's SLA policy—quarantine preserves bad rows for remediation, while fail-on-violation may halt a batch when invalid rates spike. Operational check: inject a ticket with priority P9 (or blank), confirm it lands in the quarantine path and never appears in gold SLA aggregates, verify P1–P3 tickets still publish, and review expectation metrics in the pipeline UI after the run.
Prefer to study offline? Printable PDF study book + test engine ($7.50, unofficial). These questions stay free here.