Question 65
DP-750 voucher + Udemy course (lifetime access) = ₹3,500 for Indian ID card holders.
Details →A retail analytics team operates a Lakeflow Spark Declarative Pipeline (Python) that builds `silver.orders` from a bronze streaming source. Their data-quality SLA has three tiers, and they want each tier handled by the appropriate Lakeflow **expectation action**: 1. **Fatal tier** — `order_id` must never be null. If any null `order_id` arrives, the update must halt immediately and roll back so nothing dirty is committed. 2. **Cleanse tier** — Rows where `order_total` is negative are known-bad noise from a buggy source; they should be silently discarded before the table is written, but the pipeline must keep running. 3. **Observe tier** — Rows where `currency` is not `'USD'` are allowed through (downstream converts them), but the team wants the count of such rows tracked over time in the event log so they can watch the trend. You must also reuse the **same dictionary of multiple checks with one collective fail action** for the fatal tier across several datasets. Which expectation operators correctly satisfy these requirements? (Choose THREE.)
- AUse `@dp.expect_or_fail("valid_order_id", "order_id IS NOT NULL")` (or `@dp.expect_all_or_fail({...})` to group several fatal checks) for the fatal tier.
- BUse `@dp.expect_or_drop("non_negative_total", "order_total >= 0")` for the cleanse tier.
- CUse `@dp.expect("usd_only", "currency = 'USD'")` (warn) for the observe tier so rows are retained and pass/fail counts are logged.
- DUse `@dp.expect_or_fail("non_negative_total", "order_total >= 0")` for the cleanse tier.
- EUse `@dp.expect_or_drop("usd_only", "currency = 'USD'")` for the observe tier.
- FAdd a Delta `CHECK (order_id IS NOT NULL)` enforced constraint instead of any expectation to satisfy the fatal tier.