ExpectationConfiguration
class great_expectations.expectations.expectation_configuration.ExpectationConfiguration(expectation_type: str, kwargs: dict, meta: Optional[dict] = None, notes: Optional[Union[str, list[str]]] = None, success_on_last_run: Optional[bool] = None, ge_cloud_id: Optional[str] = None, expectation_context: Optional[great_expectations.expectations.expectation_configuration.ExpectationContext] = None, rendered_content: Optional[List[great_expectations.render.components.RenderedAtomicContent]] = None)#
Defines the parameters and name of a specific Expectation.
- Parameters
expectation_type – The name of the expectation class to use in snake case, e.g. expect_column_values_to_not_be_null.
kwargs – The keyword arguments to pass to the expectation class.
meta – A dictionary of metadata to attach to the expectation.
success_on_last_run – Whether the expectation succeeded on the last run.
ge_cloud_id – The corresponding GX Cloud ID for the expectation.
expectation_context – The context for the expectation.
rendered_content – Rendered content for the expectation.
New in version 0.13.36: Used in GX Cloud deployments.
New in version 0.13.44: Used to support column descriptions in GX Cloud.
New in version 0.15.14: Used to include rendered content dictionary in expectation configuration.
- Raises
InvalidExpectationConfigurationError – If expectation_type arg is not a str.
InvalidExpectationConfigurationError – If kwargs arg is not a dict.
InvalidExpectationKwargsError – If domain kwargs are missing.
ValueError – If a domain_type cannot be determined.
- get_success_kwargs()dict #
Gets the success and domain kwargs for this ExpectationConfiguration.
- Raises
ExpectationNotFoundError – If the expectation implementation is not found.
- Returns
A dictionary with the success and domain kwargs of an expectation.
- to_json_dict()Dict[str, JSONValues] #
Returns a JSON-serializable dict representation of this ExpectationConfiguration.
- Returns
A JSON-serializable dict representation of this ExpectationConfiguration.