Import Statement
@boolean_test
Tests that return a boolean (True/False) result.Signature
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | str | Yes | - | Test name |
severity | str | No | "ERROR" | Test severity: "ERROR" or "WARNING" |
description | str | No | None | Test description |
column_name | str | No | None | Column being tested (for column-level tests) |
tags | list[str] | No | None | List of tags |
owners | list[str] | No | None | List of owners |
metadata | dict | No | None | Additional metadata |
quality_dimension | QualityDimension | No | None | Quality dimension (defaults to VALIDITY) |
skip | bool | No | False | Whether to skip this test. Useful if you want the test to appear in Elementary Cloud, but you don’t want to execute it in this run. |
Example
@expected_range
Tests that return a numeric value that should fall within a range. They can also return a list of numeric values or a pandas Series.Signature
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | str | Yes | - | Test name |
min | float | No | None | Minimum expected value (inclusive) |
max | float | No | None | Maximum expected value (inclusive) |
severity, description, column_name, tags, owners, metadata, quality_dimension, skip | - | No | - | Same as @boolean_test |
Example
@expected_values
Tests that return a value (or values) that should match one of a list of expected values.Signature
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | str | Yes | - | Test name |
expected | Any | list[Any] | Yes | - | Expected value(s) - can be single value or list |
allow_none | bool | No | False | Whether to allow None values |
severity, description, column_name, tags, owners, metadata, quality_dimension, skip | - | No | - | Same as @boolean_test |
Example
@row_count
Tests that return a Sized object (DataFrame, list, etc.) to check row count.Signature
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | str | Yes | - | Test name |
min | int | No | None | Minimum expected row count (inclusive) |
max | int | No | None | Maximum expected row count (inclusive) |
severity, description, tags, owners, metadata, skip | - | No | - | Same as @boolean_test |
Example
Common Parameters
All decorators support these common parameters:name(required): Unique test nameseverity:"ERROR"or"WARNING"(default:"ERROR")description: Human-readable test descriptiontags: List of tags for categorizationowners: List of owner emails/usernamesmetadata: Dictionary of additional metadataskip: Boolean to skip the test
Return Types
@boolean_test: Must returnbool@expected_range: Must return numeric value (int or float)@expected_values: Can return any type that can be compared@row_count: Must return a Sized object (has__len__method)
Related Documentation
- Quickstart - Get started with test decorators
- API Reference - Overview of the SDK API
- Table Assets - Register tables and views in your data warehouse

