Skip to main content
Version: 1.3.7

ValidationDefinitionFactory

Signature

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

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

Methods

Signature

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

Add a ValidationDefinition to the collection.

Parameters

NameDescription

validation

ValidationDefinition to add

Raises

TypeDescription

DataContextError

if ValidationDefinition already exists

Signature

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

NameDescription

validation

ValidationDefinition to add or update

Signature

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

Get all ValidationDefinitions.

Signature

delete(name: str)None

Delete a ValidationDefinition from the collection.

Parameters

NameDescription

name

The name of the ValidationDefinition to delete

Raises

TypeDescription

DataContextError

if ValidationDefinition doesn't exist

Signature

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

Get a ValidationDefinition from the collection by name.

Parameters

NameDescription

name

Name of ValidationDefinition to get

Raises

TypeDescription

DataContextError

when ValidationDefinition is not found.