Skip to main content
Version: 1.3.2

ValidationDefinitionFactory

class great_expectations.core.factory.ValidationDefinitionFactory(store: ValidationDefinitionStore)#

Responsible for basic CRUD operations on a Data Context’s ValidationDefinitions.

Methods

add(validation: great_expectations.core.validation_definition.ValidationDefinition) great_expectations.core.validation_definition.ValidationDefinition#

Add a ValidationDefinition to the collection.

Parameters

validation – ValidationDefinition to add

Raises

DataContextError if ValidationDefinition already exists

add_or_update(validation: great_expectations.core.validation_definition.ValidationDefinition) great_expectations.core.validation_definition.ValidationDefinition#

Add or update an ValidationDefinition by name.

If an ValidationDefinition with the same name exists, overwrite it, otherwise create a new ValidationDefinition.

Parameters

validation – ValidationDefinition to add or update

all() Iterable[great_expectations.core.validation_definition.ValidationDefinition]#

Get all ValidationDefinitions.

delete(name: str) None#

Delete a ValidationDefinition from the collection.

Parameters

name – The name of the ValidationDefinition to delete

Raises

DataContextError if ValidationDefinition doesn't exist

get(name: str) great_expectations.core.validation_definition.ValidationDefinition#

Get a ValidationDefinition from the collection by name.

Parameters

name – Name of ValidationDefinition to get

Raises

DataContextError when ValidationDefinition is not found.