expect_column_min_to_be_between

Feb 24, 2026

·

5

min read

Values distribution, Values range

·

dbt-expectations

·

Column

How it Works

The expect_column_min_to_be_between test from the dbt-expectations package validates that the minimum value in a column falls within a specified range. It's the counterpart to expect_column_max_to_be_between and is useful for catching data that unexpectedly dips below an acceptable floor — for example, negative prices, zero-value IDs, or dates in the distant past.

Configuration options include group_by, row_condition, and strictly for exclusive boundary comparisons.

Steps and Conditions

  1. Column Selection: Choose the column whose minimum should be validated.

  2. Define Range: Set min_value and/or max_value to bound the acceptable minimum.

  3. Optional Config: Apply group_by, row_condition, and strictly as needed.

  4. Execution: The column minimum is computed and compared against the range.

  5. Outcome: Pass if the minimum is within range; fail if it falls outside.

Example Usage: Energy Sector

An energy company monitors meter readings and wants to ensure the smallest recorded reading is never negative (which would indicate a sensor fault).

models:
  - name: meter_readings
    columns:
      - name: kwh_consumed
        tests:
          - dbt_expectations.expect_column_min_to_be_between:
              min_value: 0
              row_condition: "meter_status = 'active'"
models:
  - name: meter_readings
    columns:
      - name: kwh_consumed
        tests:
          - dbt_expectations.expect_column_min_to_be_between:
              min_value: 0
              row_condition: "meter_status = 'active'"
models:
  - name: meter_readings
    columns:
      - name: kwh_consumed
        tests:
          - dbt_expectations.expect_column_min_to_be_between:
              min_value: 0
              row_condition: "meter_status = 'active'"

Negative readings from active meters trigger a failure, flagging potential sensor errors for investigation.

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.