在Great Expectations中指定ExpectationConfiguration对象的评估参数



我试图找出如何指定一个评估参数,当我创建一个ExpectationConfiguration对象。

繁殖重现行为的步骤:

我已经按照说明使用ExpectationConfiguration创建期望:

https://great-expectations.readthedocs.io/en/latest/guides/how_to_guides/creating_and_editing_expectations/how_to_create_a_new_expectation_suite_without_a_sample_batch.html

我定义ExpectationConfiguration如下:

expectation_configuration_2 = ExpectationConfiguration(
expectation_type="expect_column_distinct_values_to_be_in_set",
kwargs = {
"column" : "gameid",
"value_set" : {"$PARAMETER" : "runtime_values"}
},
meta={
"notes": {
"format": "markdown",
"content": "Ensures that certain values of gameid are included. **Markdown** `Supported`"
}
}
)
suite.add_expectation(expectation_configuration=expectation_configuration_2)

但是我得到这个错误:

great_expectations.exceptions.exceptions.EvaluationParameterError: No value found for $PARAMETER runtime_values

在最新版本中,您不能在没有检查点的情况下运行期望套件。您可以从检查点传递评估参数。您还可以为套件本身的评估参数提供默认值。

相关内容

最新更新