Expect that all rows of a column satisfy a given input rule that specifies ranges and expressions.
expect_column_values_to_follow_rule
This expectation level is EXPERIMENTAL
Contributors:
Tags:
experimental
hackathon-20210206
Metrics:
column_values.nonnull.unexpected_count
column_values.expect_column_values_to_follow_rule.unexpected_count
table.row_count
column_values.expect_column_values_to_follow_rule.unexpected_values
Description
Expect that all rows of a column satisfy a given input rule that specifies ranges and expressions.
Args:
- column (str): The column name
Keyword Args:
- rule (dict): Dict with keys "ranges" and "expr". ranges is a dict whos keys are variables in the expression (expr) and whos values are an empty list or two-item list of indicies. expr is a string in the form of a Python expression that uses the variable names in the ranges dict and will be parsed with exec(); each variable is passed in as a string
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