Noos
PT EN
RAN-DBDEA-00220
Ranvier · DBDEA

Exam DBDEA Topics: transformation Difficulty: hard

Compliance requires that every payment amount be non-negative. An engineer runs the statement below on a Delta table that already holds millions of historical rows, including negative refunds imported from a legacy migration: ```sql ALTER TABLE catalog.finance.payments ADD CONSTRAINT chk_amount CHECK (amount >= 0); ``` What is the outcome of this statement, and why?

Options (Reading Mode) Click to filter discussion →
  1. A. It succeeds — the CHECK applies only to rows written after it is added, and existing rows are never re-validated against it
  2. B. It fails with a parse error — CHECK constraints are not supported on Delta tables, where only NOT NULL can be enforced
  3. C. It succeeds — the constraint is created in a disabled, logging-only state and only starts validating once it is enabled
  4. D. It fails — ADD CONSTRAINT verifies every existing row against the CHECK, and the negative rows block it until they are corrected or removed
Reveal answer

Correct answer: It fails — ADD CONSTRAINT verifies every existing row against the CHECK, and the negative rows block it until they are corrected or removed

Reference: https://docs.databricks.com/aws/en/tables/constraints

02 — The Myelin Layer · Canonical Discussion

Where the exam tries to trick you — and how those who passed solved it.

0 Passed

contributed to this question

Answer Distractor Matrix Click an option to filter or open its dissection.
✦ Consolidated Synthesis (Wiki) rev. #1 (baseline) · CC BY-SA 4.0
Start synthesis for this question →

No community synthesis consolidated for this question yet. Below is the verifiable official starting point — if you passed the exam, open the option dissection.

Official Answer (D): It fails — ADD CONSTRAINT verifies every existing row against the CHECK, and the negative rows block it until they are corrected or removed

⚓ Official Documentation Anchor: https://docs.databricks.com/aws/en/tables/constraints
Ranvier · DBDEA

Contribute to this Question

Your contribution builds your Orbital Sheath

Peer contributions

No public contribution yet. Be the first who passed to explain why the distractors trick candidates — your contribution builds your Orbital Sheath.