great_expectations.checkpoint.types.checkpoint_result
¶
Module Contents¶
Classes¶
|
The run_results property forms the backbone of this type and defines the basic contract for what a checkpoint’s |
|
Base schema class with which to define custom schemas. |
-
class
great_expectations.checkpoint.types.checkpoint_result.
CheckpointResult
(run_id: RunIdentifier, run_results: Dict[ValidationResultIdentifier, Dict[str, Union[ExpectationSuiteValidationResult, dict, str]]], checkpoint_config: CheckpointConfig, success: Optional[bool] = None)¶ Bases:
great_expectations.types.SerializableDictDot
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.
e.g. {
- ValidationResultIdentifier: {
“validation_result”: ExpectationSuiteValidationResult, “actions_results”: {
- “my_action_name_that_stores_validation_results”: {
“class”: “StoreValidationResultAction”
}
}
}
}
-
property
name
(self)¶
-
property
checkpoint_config
(self)¶
-
property
run_results
(self)¶
-
property
run_id
(self)¶
-
property
success
(self)¶
-
list_batch_identifiers
(self)¶
-
list_data_asset_names
(self)¶
-
list_expectation_suite_names
(self)¶
-
list_validation_result_identifiers
(self)¶
-
list_validation_results
(self, group_by=None)¶
-
_list_validation_results_by_validation_result_identifier
(self)¶
-
_list_validation_results_by_expectation_suite_name
(self)¶
-
_list_validation_results_by_data_asset_name
(self)¶
-
list_data_assets_validated
(self, group_by: str = None)¶
-
_list_data_assets_validated_by_batch_id
(self)¶
-
get_statistics
(self)¶
-
_list_validation_statistics
(self)¶
-
to_json_dict
(self)¶ # TODO: <Alex>2/4/2022</Alex> This implementation of “SerializableDictDot.to_json_dict() occurs frequently and should ideally serve as the reference implementation in the “SerializableDictDot” class itself. However, the circular import dependencies, due to the location of the “great_expectations/types/__init__.py” and “great_expectations/core/util.py” modules make this refactoring infeasible at the present time.
-
__getstate__
(self)¶ In order for object to be picklable, its “__dict__” or or result of calling “__getstate__()” must be picklable.
-
__deepcopy__
(self, memo)¶
-
__repr__
(self)¶ # TODO: <Alex>2/4/2022</Alex> This implementation of a custom “__repr__()” occurs frequently and should ideally serve as the reference implementation in the “SerializableDictDot” class. However, the circular import dependencies, due to the location of the “great_expectations/types/__init__.py” and “great_expectations/core/util.py” modules make this refactoring infeasible at the present time.
-
__str__
(self)¶ # TODO: <Alex>2/4/2022</Alex> This implementation of a custom “__str__()” occurs frequently and should ideally serve as the reference implementation in the “SerializableDictDot” class. However, the circular import dependencies, due to the location of the “great_expectations/types/__init__.py” and “great_expectations/core/util.py” modules make this refactoring infeasible at the present time.
-
class
great_expectations.checkpoint.types.checkpoint_result.
CheckpointResultSchema
(*, only: types.StrSequenceOrSet = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: typing.Dict = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: typing.Union[bool, types.StrSequenceOrSet] = False, unknown: str = None)¶ Bases:
great_expectations.marshmallow__shade.Schema
Base schema class with which to define custom schemas.
Example usage:
import datetime as dt from dataclasses import dataclass from great_expectations.marshmallow__shade import Schema, fields @dataclass class Album: title: str release_date: dt.date class AlbumSchema(Schema): title = fields.Str() release_date = fields.Date() album = Album("Beggars Banquet", dt.date(1968, 12, 6)) schema = AlbumSchema() data = schema.dump(album) data # {'release_date': '1968-12-06', 'title': 'Beggars Banquet'}
- Parameters
only – Whitelist of the declared fields to select when instantiating the Schema. If None, all fields are used. Nested fields can be represented with dot delimiters.
exclude – Blacklist of the declared fields to exclude when instantiating the Schema. If a field appears in both only and exclude, it is not used. Nested fields can be represented with dot delimiters.
many – Should be set to True if
obj
is a collection so that the object will be serialized to a list.context – Optional context passed to
fields.Method
andfields.Function
fields.load_only – Fields to skip during serialization (write-only fields)
dump_only – Fields to skip during deserialization (read-only fields)
partial – Whether to ignore missing fields and not require any fields declared. Propagates down to
Nested
fields as well. If its value is an iterable, only missing fields listed in that iterable will be ignored. Use dot delimiters to specify nested fields.unknown – Whether to exclude, include, or raise an error for unknown fields in the data. Use EXCLUDE, INCLUDE or RAISE.
Changed in version 3.0.0: prefix parameter removed.
Changed in version 2.0.0: __validators__, __preprocessors__, and __data_handlers__ are removed in favor of marshmallow.decorators.validates_schema, marshmallow.decorators.pre_load and marshmallow.decorators.post_dump. __accessor__ and __error_handler__ are deprecated. Implement the handle_error and get_attribute methods instead.
-
run_id
¶
-
run_results
¶
-
checkpoint_config
¶
-
success
¶
-
prepare_dump
(self, data, **kwargs)¶
-
make_checkpoint_result
(self, data, **kwargs)¶
-
great_expectations.checkpoint.types.checkpoint_result.
checkpointResultSchema
¶