Skip to main content
Version: 1.3.7

ValidationDefinition

Signature

class great_expectations.ValidationDefinition(*, name: str, data: great_expectations.core.batch_definition.BatchDefinition, suite: great_expectations.core.expectation_suite.ExpectationSuite, id: Optional[str] = None)

Responsible for running a suite against data and returning a validation result.

Parameters

NameDescription

name

The name of the validation.

Properties

NameDescriptionReference

asset

The parent Data Asset of the Batch Definition.

DataAsset

batch_definition

The Batch Definition to validate.

BatchDefinition

Methods

Signature

run(*, checkpoint_id: Optional[str] = None, batch_parameters: Optional[BatchParameters] = None, expectation_parameters: Optional[SuiteParameterDict] = None, result_format: ResultFormatUnion = ResultFormat.SUMMARY, run_id: RunIdentifier | None = None) → ExpectationSuiteValidationResult

Runs a validation using the configured data and suite.

Parameters

NameDescription

batch_parameters

The dictionary of parameters necessary for selecting the correct batch to run the validation on. The keys are strings that are determined by the BatchDefinition used to instantiate this ValidationDefinition. For example:

whole table -> None

yearly -> year

monthly -> year, month

daily -> year, month, day

Signature

save()None

Save the current state of this ValidationDefinition.