Expect all values in a numeric column to have the same number of specified decimal places.
expect_column_values_number_of_decimal_places_to_equal
This expectation level is EXPERIMENTAL
Contributors:
Tags:
experimental
precision
formatting
floating_point
hackathon-20200123
Metrics:
column_values.nonnull.unexpected_count
column_values.decimal_places_equal.unexpected_count
table.row_count
column_values.decimal_places_equal.unexpected_values
Description
Expect all values in a numeric column to have the same number of specified decimal places.
This expectation tests if all the values in a column has the same number of decimal places as the
inputted number of decimal places. In the case where the decimal places are all 0s (an integer),
the value automatically passes. Currently have not figured out how to preserve 0s in decimal to string conversion.
Want to make your own Expectation or an improvement to this one?
We've put together some great how to guides (including videos) on how to create your own expectations in a flash!
You can see those resources here: Contributor Resources