expect_column_values_to_be_increasing
Feb 24, 2026
·
5
min read
Values distribution
·
dbt-expectations
·
Column
How it Works
The expect_column_values_to_be_increasing test from the dbt-expectations package validates that values in a column are monotonically non-decreasing (or strictly increasing, if configured). This is useful for validating sequential IDs, timestamps, or running totals that should always move forward.
The strictly argument (default false) controls whether equal consecutive values are acceptable.
Steps and Conditions
Column Selection: Identify the column to validate.
Optional Sort: Specify
sort_columnandsort_column_descto define ordering.Strictness: Set
strictly: truefor strictly increasing,falsefor non-decreasing.Execution: Each value is compared to the previous row's value.
Outcome: Pass if the sequence is monotonically increasing; fail if any decrease is detected.
Example Usage: Sequence IDs
A data engineering team maintains an event_sequence column that must always increase with each new record inserted.
Any out-of-order or duplicate sequence values fail the test, alerting the team to event ordering issues.





