JK Sahoo
02/07/2025, 5:53 AMexpect_column_proportion_of_unique_values_to_be_between condition. We're basically checking for a condition where the min value is 0.9. Ideally, we want the test case to warn us if the value is less than 0.98. But throw an error if it drops below 0.9. I'm using the following condition and it doesn't compile successfully! It complained about the condition not having a minimum value. I'm going add min_value: 0.91 just below the config bit.
tests:
- dbt_expectations.expect_column_proportion_of_unique_values_to_be_between:
config:
severity: warn
error_if: "<0.9"
warn_if: "<0.984"
Is there a better way of doing this?
Thank you!Noya Offer
02/09/2025, 11:51 AMtests:
- dbt_expectations.expect_column_proportion_of_unique_values_to_be_between:
min_value: 0.91 # Required
max_value: 1.0 # Upper limit
config:
severity: warn
error_if: "<0.9"
warn_if: "<0.984"
See our dbt Test Hub for detailed explanations about all dbt packages and Elementary tests!JK Sahoo
02/09/2025, 11:29 PMNoya Offer
02/10/2025, 7:10 AM