CheckpointResult
- class great_expectations.checkpoint.types.checkpoint_result.CheckpointResult(run_id: great_expectations.core.run_identifier.RunIdentifier, run_results: Dict[great_expectations.data_context.types.resource_identifiers.ValidationResultIdentifier, Dict[str, Union[great_expectations.core.expectation_validation_result.ExpectationSuiteValidationResult, dict, str]]], checkpoint_config: great_expectations.data_context.types.base.CheckpointConfig, validation_result_url: Optional[str] = None, success: Optional[bool] = None)#
Object returned by Checkpoint.run.
The run_results property forms the backbone of this type and defines the basic contract for what a checkpoint's run method returns. It is a dictionary where the top-level keys are the ValidationResultIdentifiers of the validation results generated in the run. Each value is a dictionary having at minimum, a "validation_result" key containing an ExpectationSuiteValidationResult and an "actions_results" key containing a dictionary where the top-level keys are names of actions performed after that particular validation, with values containing any relevant outputs of that action (at minimum and in many cases, this would just be a dictionary with the action's class_name).
The run_results dictionary can contain other keys that are relevant for a specific checkpoint implementation. For example, the run_results dictionary from a WarningAndFailureExpectationSuiteCheckpoint might have an extra key named "expectation_suite_severity_level" to indicate if the suite is at either a "warning" or "failure" level.
Example run_results Dict:
{
ValidationResultIdentifier: {
"validation_result": ExpectationSuiteValidationResult,
"actions_results": {
"my_action_name_that_stores_validation_results": {
"class": "StoreValidationResultAction"
}
}
}
}- Parameters:
run_id – An instance of the RunIdentifier class.
run_results – A Dict with ValidationResultIdentifier keys and Dict values, which contains at minimum a validation_result key and an action_results key.
checkpoint_config – The CheckpointConfig instance used to create this CheckpointResult.
success – An optional boolean describing the success of all run_results in this CheckpointResult.
- list_expectation_suite_names() List[str] #
Return the list of expecation suite names for a checkpoint.
- Parameters:
None –
- Returns:
The list of expectation suite names.
- Return type:
self._expectation_suite_names
- list_validation_result_identifiers() List[great_expectations.data_context.types.resource_identifiers.ValidationResultIdentifier] #
Obtain a list of all the ValidationResultIdentifiers used in this CheckpointResult.
Args:
- Returns:
List of zero or more ValidationResultIdentifier instances.
- list_validation_results(group_by=None) Union[List[great_expectations.core.expectation_validation_result.ExpectationSuiteValidationResult], dict] #
Obtain the ExpectationValidationResults belonging to this CheckpointResult.
- Parameters:
group_by – Specify how the ExpectationValidationResults should be grouped. Valid options are "validation_result_identifier", "expectation_suite_name", "data_asset_name", or the default None. Providing an invalid group_by value will cause this method to silently fail, and return None.
- Returns:
A list of ExpectationSuiteValidationResult, when group_by=None A dict of ValidationResultIdentifier keys and ExpectationValidationResults
values, when group_by="validation_result_identifier"
- A dict of str keys and ExpectationValidationResults values, when
group_by="expectation_suite_name" or group_by="data_asset_name"
None, when group_by is something other than the options described above
- to_json_dict() Dict[str, Optional[Union[Dict[str, Optional[Union[Dict[str, JSONValues], List[JSONValues], str, int, float, bool]]], List[Optional[Union[Dict[str, JSONValues], List[JSONValues], str, int, float, bool]]], str, int, float, bool]]] #
Returns a JSON-serializable dict representation of this CheckpointResult.
- Returns:
A JSON-serializable dict representation of this CheckpointResult.