expect_column_quantile_values_to_be_between
How it Works
The expect_column_quantile_values_to_be_between test from the dbt-expectations package validates that a specified quantile of a column's values falls within a defined range. This enables flexible distribution checks without relying on mean or standard deviation, which can be skewed by outliers.
The quantile argument specifies the quantile to evaluate (e.g., 0.5 for the median, 0.95 for the 95th percentile).
Steps and Conditions
- Column Selection: Choose the numeric column.
- Quantile: Specify the quantile value between 0 and 1.
- Define Range: Set
min_valueand/ormax_value. - Execution: The specified quantile is computed and compared to the range.
- Outcome: Pass if within range; fail otherwise.
Example Usage: Performance Monitoring
A platform engineering team monitors API response times and wants to ensure the 95th percentile latency stays below 500ms.
models:
- name: api_request_logs
columns:
- name: response_time_ms
tests:
- dbt_expectations.expect_column_quantile_values_to_be_between:
quantile: 0.95
min_value: 0
max_value: 500This ensures that the vast majority of API requests are served within performance SLA bounds.
Interested to Learn More? Try Out the Free 14-Days Trial
One AI-native workspace to build, ship, and monitor dbt™ — without the tool sprawl.
Join industry leaders winning with DinoAI agents
Data engineers and analysts at the most AI-native startups and enterprises use Paradime's DinoAI agents everyday to become market leaders.