Skip to main content
Version: 1.3.7

SuiteFactory

Signature

class great_expectations.core.factory.SuiteFactory(store: ExpectationsStore)

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

Methods

Signature

add(suite: great_expectations.core.expectation_suite.ExpectationSuite) → great_expectations.core.expectation_suite.ExpectationSuite

Add an ExpectationSuite to the collection.

Parameters

NameDescription

suite

ExpectationSuite to add

Raises

TypeDescription

DataContextError

if ExpectationSuite already exists

Signature

add_or_update(suite: great_expectations.core.expectation_suite.ExpectationSuite) → great_expectations.core.expectation_suite.ExpectationSuite

Add or update an ExpectationSuite by name.

If an ExpectationSuite with the same name exists, overwrite it, otherwise create a new ExpectationSuite. On update, Expectations in the Suite which match a previously existing Expectation maintain a stable ID, and Expectations which have changed receive a new ID.

Parameters

NameDescription

suite

ExpectationSuite to add or update

Signature

all() → Iterable[great_expectations.core.expectation_suite.ExpectationSuite]

Get all ExpectationSuites.

Signature

delete(name: str)None

Delete an ExpectationSuite from the collection.

Parameters

NameDescription

name

The name of the ExpectationSuite to delete

Raises

TypeDescription

DataContextError

if ExpectationSuite doesn't exist

Signature

get(name: str) → great_expectations.core.expectation_suite.ExpectationSuite

Get an ExpectationSuite from the collection by name.

Parameters

NameDescription

name

Name of ExpectationSuite to get

Raises

TypeDescription

DataContextError

when ExpectationSuite is not found.