Can I use an evaluation parameter to pass in a dynamically calculated argument to the "mostly" parameter in expectations?

Great Expectations does not support passing in evaluation parameters to the mostly parameter.

On the face of it, it seems like it would make sense to be able to pass in an evaluation parameter to the mostly parameter in an expectation. After all, mostly is a kwarg just like min_value or max_value. So why can’t we send in an evaluation parameter to mostly just like the other kwargs?

To answer this, think about the following scenario. You want a warning suite and a failure suite where both contain the same expectations but with different configurations in the mostly parameter. For example, you would like to be warned if expect_column_values_to_not_be_null fails with the mostly parameter configured to 0.99, but you want the pipeline to fail if that same expectation fails with the mostly parameter configured to 0.95. In this case, the identity of those two expectations is only different because of the difference in the configuration of the mostly parameter. This means that the mostly parameter is logically a configuration option that must be set to complete the identity of an expectation.

1 Like