Skip to main content

ColumnMapExpectation

class great_expectations.expectations.expectation.ColumnMapExpectation(configuration: Optional[great_expectations.core.expectation_configuration.ExpectationConfiguration] = None)#

Base class for ColumnMapExpectations.

ColumnMapExpectations are evaluated for a column and ask a yes/no question about every row in the column. Based on the result, they then calculate the percentage of rows that gave a positive answer. If the percentage is high enough, the Expectation considers that data valid.

ColumnMapExpectations must implement a _validate(…) method containing logic for determining whether the Expectation is successfully validated.

ColumnMapExpectations may optionally provide implementations of validate_configuration, which should raise an error if the configuration will not be usable for the Expectation. By default, the validate_configuration method will return an error if column is missing from the configuration.

Raises:

InvalidExpectationConfigurationError – If column is missing from configuration.

Parameters:
  • domain_keys (tuple) – A tuple of the keys used to determine the domain of the expectation.

  • success_keys (tuple) – A tuple of the keys used to determine the success of the expectation.

  • default_kwarg_values (optional[dict]) – Optional. A dictionary that will be used to fill unspecified kwargs from the Expectation Configuration.

domain_type = 'column'#