Courseiva

Databricks-DA-Assoc Data Modeling with Databricks SQL Practice Question

A data analyst is working with a Delta table that contains a column 'status' with values 'active', 'inactive', and 'pending'. The analyst wants to enforce that only these three values can be inserted or updated. Which Databricks SQL feature should the analyst use?

⚠ Common exam trap

Many candidates confuse access control features like column masks with data validation constraints.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

CHECK constraint on the status column.

A CHECK constraint is the appropriate feature to enforce that the status column only contains a specific set of values. It is evaluated on insert and update, rejecting rows that violate the condition. This ensures data integrity directly in the table definition. Other options like NOT NULL, generated columns, or column masks do not restrict the domain of values for a column.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    CHECK constraint on the status column.

    Why this is correct

    A CHECK constraint allows defining a Boolean expression that must be true for all rows. By specifying status IN ('active','inactive','pending'), the analyst enforces the allowed values. Delta Lake supports CHECK constraints, and they are enforced on write operations, ensuring data integrity. This is the correct way to restrict column values to a specific set.

  • ✗

    Column mask that filters out invalid statuses.

    Why it's wrong here

    A column mask is used for access control, not for enforcing data validity. It can obscure data based on user permissions but does not prevent invalid values from being written. The analyst needs to enforce allowed values at write time, which is not the purpose of column masks. Using a mask would not stop invalid data from entering the table.

  • ✗

    NOT NULL constraint on the status column.

    Why it's wrong here

    A NOT NULL constraint only prevents null values; it does not restrict the column to a specific set of values. The analyst needs to limit values to three specific strings, so NOT NULL is insufficient. It would allow any non-null string, including invalid ones. Therefore, it does not meet the requirement of enforcing the enumerated values.

  • ✗

    Generated column that maps status to an integer.

    Why it's wrong here

    A generated column computes its value from other columns and cannot enforce allowed values on the original status column. It could be used to create a derived column, but it does not prevent invalid entries in status. The requirement is to restrict the status column itself, so a generated column is not appropriate. It adds complexity without solving the constraint need.

About these practice questions

Courseiva writes every Databricks-DA-Assoc question from scratch — 291 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Databricks exam blueprint

This Databricks-DA-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-DA-Assoc exam.