How it Works
The at_least_one test from dbt-utils™ validates that a column contains at least one non-null value. While simple, this test is an important safety net to detect empty or fully-null columns that would silently break downstream aggregations or lookups. It's commonly applied to key columns in models that should always have data.
Steps and Conditions
Column Selection: Identify the column to evaluate.
Execution: The test checks whether any non-null value exists in the column.
Outcome: Pass if at least one non-null value is found; fail if all values are null.
Example Usage: Product Inventory
A product inventory model should always have at least one active SKU. The team applies at_least_one to ensure the table is never fully empty after a transformation.
A completely null sku column would indicate a failed data load, which this test will catch immediately.





