calogica / dbt-expectations

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

Test macro for numeric precision and scale #262

Open samousavih opened 1 year ago

samousavih commented 1 year ago

Is your feature request related to a problem? Please describe. This package allows asserting column types by "expect_column_values_to_be_of_type". However, it doesn't include precision and scale when it comes to numeric types.

Describe the solution you'd like Adding a new macro which can assert numeric types with precision and scale as parameters.

Describe alternatives you've considered No alternative

Additional context I have implemented this in my own project as I need to assert numeric types accurately.

ppsplus-djm commented 11 months ago

The same should also exist for varchar sizes in order to test that a column size didn't accidentally shrink.