FEFreeExamDumps.in

Implementing Data Engineering Solutions Using Azure Databricks

Topic 1

Question 62

DP-750 voucher + Udemy course (lifetime access) = ₹3,500 for Indian ID card holders.

Details →

A Unity Catalog Delta table `finance.ledger` already contains millions of rows. The governance team requires a **hard, enforced** data quality rule: the `posting_year` column (an `INT`) must only ever contain four-digit years between 1900 and 2100. Any future `INSERT` or `MERGE` that would write a value outside that range must fail the transaction at write time, and the existing rows must be validated when the rule is added. You are choosing how to implement this rule directly on the table (not in a Lakeflow pipeline). You run: ```sql ALTER TABLE finance.ledger ADD CONSTRAINT validPostingYear CHECK (posting_year >= 1900 AND posting_year <= 2100); ``` Which statement most accurately describes the behavior of this command on Azure Databricks?

  • AThe `CHECK` constraint is informational only and is not enforced; it merely helps the query optimizer, so out-of-range inserts still succeed.
  • BThe `CHECK` constraint is an enforced constraint; Databricks first verifies that all existing rows satisfy it before adding it, and afterward any write that violates it fails the transaction with an error.
  • CThe command fails because `CHECK` constraints can only be declared in the `CREATE TABLE` statement, never added with `ALTER TABLE`.
  • DThe constraint is enforced only for streaming writes via Auto Loader; batch `INSERT` statements bypass it.
  • EAdding the constraint silently drops any existing rows that violate the condition, then enforces it for new writes.