calogica / dbt-expectations

Port(ish) of Great Expectations to dbt test macros
https://calogica.github.io/dbt-expectations/
Apache License 2.0
1.01k stars 123 forks source link

[Feature Request] Specify optional expected case for `expect_column_values_to_have_consistent_casing` #248

Open owenprough-sift opened 1 year ago

owenprough-sift commented 1 year ago

Is your feature request related to a problem? Please describe. I have some string columns whose values should always be uppercase and others whose value should always be lowercase. Today, I can use expect_column_values_to_have_consistent_casing to validate that the column is same-cased, but then I would need to add another test to the column to verify that the casing is correct.

Describe the solution you'd like My .yml files would be more intuitive if there existed an optional expected_case parameter for expect_column_values_to_have_consistent_casing.

Describe alternatives you've considered Today I use dbt_utils.expression_is_true() to enforce this expectation.