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

  1. Column Selection: Identify the column to validate.

  2. Optional Sort: Specify sort_column and sort_column_desc to define ordering.

  3. Strictness: Set strictly: true for strictly increasing, false for non-decreasing.

  4. Execution: Each value is compared to the previous row's value.

  5. 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.

models:
  - name: event_log
    columns:
      - name: event_sequence
        tests:
          - dbt_expectations.expect_column_values_to_be_increasing:
              strictly: true
              sort_column

models:
  - name: event_log
    columns:
      - name: event_sequence
        tests:
          - dbt_expectations.expect_column_values_to_be_increasing:
              strictly: true
              sort_column

models:
  - name: event_log
    columns:
      - name: event_sequence
        tests:
          - dbt_expectations.expect_column_values_to_be_increasing:
              strictly: true
              sort_column

Any out-of-order or duplicate sequence values fail the test, alerting the team to event ordering issues.

Interested to Learn More?
Try Out the Free 14-Days Trial

More Articles

decorative icon

Experience Analytics for the AI-Era

Start your 14-day trial today - it's free and no credit card needed

decorative icon

Experience Analytics for the AI-Era

Start your 14-day trial today - it's free and no credit card needed

decorative icon

Experience Analytics for the AI-Era

Start your 14-day trial today - it's free and no credit card needed

Copyright © 2026 Paradime Labs, Inc.

Made with ❤️ in San Francisco ・ London

*dbt® and dbt Core® are federally registered trademarks of dbt Labs, Inc. in the United States and various jurisdictions around the world. Paradime is not a partner of dbt Labs. All rights therein are reserved to dbt Labs. Paradime is not a product or service of or endorsed by dbt Labs, Inc.

Copyright © 2026 Paradime Labs, Inc.

Made with ❤️ in San Francisco ・ London

*dbt® and dbt Core® are federally registered trademarks of dbt Labs, Inc. in the United States and various jurisdictions around the world. Paradime is not a partner of dbt Labs. All rights therein are reserved to dbt Labs. Paradime is not a product or service of or endorsed by dbt Labs, Inc.

Copyright © 2026 Paradime Labs, Inc.

Made with ❤️ in San Francisco ・ London

*dbt® and dbt Core® are federally registered trademarks of dbt Labs, Inc. in the United States and various jurisdictions around the world. Paradime is not a partner of dbt Labs. All rights therein are reserved to dbt Labs. Paradime is not a product or service of or endorsed by dbt Labs, Inc.