TableExpectation
- class great_expectations.expectations.expectation.TableExpectation(configuration: Optional[great_expectations.core.expectation_configuration.ExpectationConfiguration] = None)#
Base class for TableExpectations.
TableExpectations answer a semantic question about the table itself.
For example, expect_table_column_count_to_equal and expect_table_row_count_to_equal answer how many columns and rows are in your table.
TableExpectations must implement a _validate(…) method containing logic for determining whether the Expectation is successfully validated.
TableExpectations may optionally provide implementations of validate_configuration, which should raise an error if the configuration will not be usable for the Expectation.
- Raises:
InvalidExpectationConfigurationError – The configuration does not contain the values required by the Expectation.
- Parameters:
domain_keys (tuple) – A tuple of the keys used to determine the domain of the expectation.
- domain_type = 'table'#
- validate_configuration(configuration: Optional[great_expectations.core.expectation_configuration.ExpectationConfiguration] = None) None #
Validates the configuration for the Expectation.
For all expectations, the configuration’s expectation_type needs to match the type of the expectation being configured. This method is meant to be overridden by specific expectations to provide additional validation checks as required. Overriding methods should call super().validate_configuration(configuration).
- Raises:
InvalidExpectationConfigurationError – The configuration does not contain the values required by the Expectation.