great_expectations.expectations.metrics

Subpackages

Package Contents

Classes

MetaMetricProvider()

MetaMetricProvider registers metrics as they are defined.

DeprecatedMetaMetricProvider()

Goals:

ColumnMetricProvider()

Base class for all metric providers.

ColumnAggregateMetricProvider()

Base class for all metric providers.

ColumnDistinctValues()

Base class for all metric providers.

ColumnDistinctValuesCount()

Base class for all metric providers.

ColumnHistogram()

Base class for all metric providers.

ColumnMax()

Base class for all metric providers.

ColumnMean()

MetricProvider Class for Aggregate Mean MetricProvider

ColumnMedian()

MetricProvider Class for Aggregate Mean MetricProvider

ColumnMin()

Base class for all metric providers.

ColumnMostCommonValue()

Base class for all metric providers.

ColumnParameterizedDistributionKSTestPValue()

MetricProvider Class for Aggregate Standard Deviation metric

ColumnPartition()

Base class for all metric providers.

ColumnUniqueProportion()

Base class for all metric providers.

ColumnQuantileValues()

Base class for all metric providers.

ColumnStandardDeviation()

MetricProvider Class for Aggregate Standard Deviation metric

ColumnSum()

Base class for all metric providers.

ColumnValueCounts()

Base class for all metric providers.

ColumnValuesBetweenCount()

This metric is an aggregate helper for rare cases.

ColumnValuesValueLength()

Base class for all metric providers.

ColumnValuesValueLengthEquals()

Base class for all metric providers.

ColumnValuesBetween()

Base class for all metric providers.

ColumnValuesDateutilParseable()

Base class for all metric providers.

ColumnValuesDecreasing()

Base class for all metric providers.

ColumnValuesInSet()

Base class for all metric providers.

ColumnValuesInTypeList()

Base class for all metric providers.

ColumnValuesIncreasing()

Base class for all metric providers.

ColumnValuesJsonParseable()

Base class for all metric providers.

ColumnValuesMatchJsonSchema()

Base class for all metric providers.

ColumnValuesMatchLikePattern()

Base class for all metric providers.

ColumnValuesMatchLikePatternList()

Base class for all metric providers.

ColumnValuesMatchRegex()

Base class for all metric providers.

ColumnValuesMatchRegexList()

Base class for all metric providers.

ColumnValuesMatchStrftimeFormat()

Base class for all metric providers.

ColumnValuesNonNull()

Base class for all metric providers.

ColumnValuesNotInSet()

Base class for all metric providers.

ColumnValuesNotMatchLikePattern()

Base class for all metric providers.

ColumnValuesNotMatchLikePatternList()

Base class for all metric providers.

ColumnValuesNotMatchRegex()

Base class for all metric providers.

ColumnValuesNotMatchRegexList()

Base class for all metric providers.

ColumnValuesNull()

Base class for all metric providers.

ColumnValuesOfType()

Base class for all metric providers.

ColumnValuesUnique()

Base class for all metric providers.

ColumnValuesZScore()

Base class for all metric providers.

ColumnPairValuesEqual()

Base class for all metric providers.

ColumnPairValuesAGreaterThanB()

Base class for all metric providers.

ColumnPairValuesInSet()

Base class for all metric providers.

ColumnMapMetricProvider()

Base class for all metric providers.

MapMetricProvider()

Base class for all metric providers.

MetricDomainTypes()

Generic enumeration.

MetricFunctionTypes()

Generic enumeration.

MetricPartialFunctionTypes()

Generic enumeration.

MetricProvider()

Base class for all metric providers.

CompoundColumnsUnique()

While the support for “PandasExecutionEngine” and “SparkDFExecutionEngine” is accomplished using a compact

MulticolumnSumEqual()

Base class for all metric providers.

SelectColumnValuesUniqueWithinRecord()

Base class for all metric providers.

TableColumnCount()

Base class for all metric providers.

ColumnTypes()

Base class for all metric providers.

TableColumns()

Base class for all metric providers.

TableHead()

Base class for all metric providers.

TableRowCount()

Base class for all metric providers.

Functions

column_aggregate_partial(engine: Type[ExecutionEngine], **kwargs)

Return the column aggregate metric decorator for the specified engine.

column_aggregate_value(engine: Type[ExecutionEngine], metric_fn_type=’value’, domain_type=’column’, **kwargs)

Return the column aggregate metric decorator for the specified engine.

column_condition_partial(engine: Type[ExecutionEngine], partial_fn_type: Optional[Union[str, MetricPartialFunctionTypes]] = None, **kwargs)

Provides engine-specific support for authoring a metric_fn with a simplified signature.

column_function_partial(engine: Type[ExecutionEngine], partial_fn_type: str = None, **kwargs)

Provides engine-specific support for authoring a metric_fn with a simplified signature.

metric_partial(engine: Type[ExecutionEngine], partial_fn_type: Union[str, MetricPartialFunctionTypes], domain_type: Union[str, MetricDomainTypes], **kwargs)

The metric decorator annotates a method

metric_value(engine: Type[ExecutionEngine], metric_fn_type: Union[str, MetricFunctionTypes] = MetricFunctionTypes.VALUE, **kwargs)

The metric decorator annotates a method

class great_expectations.expectations.metrics.MetaMetricProvider

Bases: type

MetaMetricProvider registers metrics as they are defined.

class great_expectations.expectations.metrics.DeprecatedMetaMetricProvider

Bases: great_expectations.expectations.metrics.meta_metric_provider.MetaMetricProvider

Goals: Instantiation of a deprecated class should raise a warning; Subclassing of a deprecated class should raise a warning; Support isinstance and issubclass checks.

__instancecheck__(cls, instance)

Check if an object is an instance.

__subclasscheck__(cls, subclass)

Check if a class is a subclass.

class great_expectations.expectations.metrics.ColumnMetricProvider

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

_DeprecatedMetaMetricProvider__alias
class great_expectations.expectations.metrics.ColumnAggregateMetricProvider

Bases: great_expectations.expectations.metrics.table_metric_provider.TableMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

domain_keys = ['batch_id', 'table', 'column', 'row_condition', 'condition_parser']
filter_column_isnull = False
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)
great_expectations.expectations.metrics.column_aggregate_partial(engine: Type[ExecutionEngine], **kwargs)

Return the column aggregate metric decorator for the specified engine.

Parameters
  • engine

  • **kwargs

Returns:

great_expectations.expectations.metrics.column_aggregate_value(engine: Type[ExecutionEngine], metric_fn_type='value', domain_type='column', **kwargs)

Return the column aggregate metric decorator for the specified engine.

Parameters
  • engine

  • **kwargs

Returns:

class great_expectations.expectations.metrics.ColumnDistinctValues

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = column.distinct_values
_pandas(cls, column, **kwargs)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[Dict] = None)

Returns a dictionary of given metric names and their corresponding configuration, specifying the metric types and their respective domains

class great_expectations.expectations.metrics.ColumnDistinctValuesCount

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = column.distinct_values.count
_pandas(cls, column, **kwargs)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[Dict] = None)

Returns a dictionary of given metric names and their corresponding configuration, specifying the metric types and their respective domains

class great_expectations.expectations.metrics.ColumnHistogram

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = column.histogram
value_keys = ['bins']
_pandas(cls, execution_engine: PandasExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)

return a list of counts corresponding to bins

Parameters
  • column – the name of the column for which to get the histogram

  • bins – tuple of bin edges for which to get histogram values; must be tuple to support caching

_spark(cls, execution_engine: SparkDFExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
class great_expectations.expectations.metrics.ColumnMax

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = column.max
value_keys = ['parse_strings_as_datetimes']
_pandas(cls, column, **kwargs)
_sqlalchemy(cls, column, **kwargs)
_spark(cls, column, **kwargs)
class great_expectations.expectations.metrics.ColumnMean

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

MetricProvider Class for Aggregate Mean MetricProvider

metric_name = column.mean
_pandas(cls, column, **kwargs)

Pandas Mean Implementation

_sqlalchemy(cls, column, **kwargs)

SqlAlchemy Mean Implementation

_spark(cls, column, _table, _column_name, **kwargs)

Spark Mean Implementation

class great_expectations.expectations.metrics.ColumnMedian

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

MetricProvider Class for Aggregate Mean MetricProvider

metric_name = column.median
_pandas(cls, column, **kwargs)

Pandas Median Implementation

_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)

This should return a dictionary: {

“dependency_name”: MetricConfiguration, …

}

class great_expectations.expectations.metrics.ColumnMin

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = column.min
value_keys = ['parse_strings_as_datetimes']
_pandas(cls, column, **kwargs)
_sqlalchemy(cls, column, **kwargs)
_spark(cls, column, **kwargs)
class great_expectations.expectations.metrics.ColumnMostCommonValue

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = column.most_common_value
_pandas(cls, column, **kwargs)
_spark(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[Dict] = None)

Returns a dictionary of given metric names and their corresponding configuration, specifying the metric types and their respective domains

class great_expectations.expectations.metrics.ColumnParameterizedDistributionKSTestPValue

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

MetricProvider Class for Aggregate Standard Deviation metric

metric_name = column.parameterized_distribution_ks_test_p_value
value_keys = ['distribution', 'p_value', 'params']
_pandas(cls, column, distribution, p_value=0.05, params=None, **kwargs)
class great_expectations.expectations.metrics.ColumnPartition

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = column.partition
value_keys = ['bins', 'n_bins', 'allow_relative_error']
default_kwarg_values
_pandas(cls, execution_engine: PandasExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: PandasExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: PandasExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)
class great_expectations.expectations.metrics.ColumnUniqueProportion

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = column.unique_proportion
_pandas(*args, metrics, **kwargs)
_sqlalchemy(*args, metrics, **kwargs)
_spark(*args, metrics, **kwargs)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)
class great_expectations.expectations.metrics.ColumnQuantileValues

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = column.quantile_values
value_keys = ['quantiles', 'allow_relative_error']
_pandas(cls, column, quantiles, allow_relative_error, **kwargs)

Quantile Function

_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
class great_expectations.expectations.metrics.ColumnStandardDeviation

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

MetricProvider Class for Aggregate Standard Deviation metric

metric_name = column.standard_deviation
_pandas(cls, column, **kwargs)

Pandas Standard Deviation implementation

_sqlalchemy(cls, column, _dialect, **kwargs)

SqlAlchemy Standard Deviation implementation

_spark(cls, column, **kwargs)

Spark Standard Deviation implementation

class great_expectations.expectations.metrics.ColumnSum

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = column.sum
_pandas(cls, column, **kwargs)
_sqlalchemy(cls, column, **kwargs)
_spark(cls, column, **kwargs)
class great_expectations.expectations.metrics.ColumnValueCounts

Bases: great_expectations.expectations.metrics.column_aggregate_metric_provider.ColumnAggregateMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = column.value_counts
value_keys = ['sort', 'collate']
default_kwarg_values
_pandas(cls, execution_engine: PandasExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SparkDFExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
class great_expectations.expectations.metrics.ColumnValuesBetweenCount

Bases: great_expectations.expectations.metrics.metric_provider.MetricProvider

This metric is an aggregate helper for rare cases.

metric_name = column_values.between.count
value_keys = ['min_value', 'max_value', 'strict_min', 'strict_max']
_pandas(cls, execution_engine: PandasExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SparkDFExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
class great_expectations.expectations.metrics.ColumnValuesValueLength

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.value_length.between
function_metric_name = column_values.value_length
condition_value_keys = ['min_value', 'max_value', 'strict_min', 'strict_max']
_pandas_function(cls, column, **kwargs)
_sqlalchemy_function(cls, column, **kwargs)
_spark_function(cls, column, **kwargs)
_pandas(cls, column, _metrics, min_value=None, max_value=None, strict_min=None, strict_max=None, **kwargs)
_sqlalchemy(cls, column, _metrics, min_value=None, max_value=None, strict_min=None, strict_max=None, **kwargs)
_spark(cls, column, _metrics, min_value=None, max_value=None, strict_min=None, strict_max=None, **kwargs)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)
class great_expectations.expectations.metrics.ColumnValuesValueLengthEquals

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.value_length.equals
condition_value_keys = ['value']
_pandas(cls, column, value, _metrics, **kwargs)
_sqlalchemy(cls, column, value, _metrics, **kwargs)
_spark(cls, column, value, _metrics, **kwargs)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)
class great_expectations.expectations.metrics.ColumnValuesBetween

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.between
condition_value_keys = ['min_value', 'max_value', 'strict_min', 'strict_max', 'parse_strings_as_datetimes', 'allow_cross_type_comparisons']
_pandas(cls, column, min_value=None, max_value=None, strict_min=None, strict_max=None, parse_strings_as_datetimes: Optional[bool] = False, allow_cross_type_comparisons=None, **kwargs)
_sqlalchemy(cls, column, min_value=None, max_value=None, strict_min=None, strict_max=None, parse_strings_as_datetimes: Optional[bool] = False, **kwargs)
_spark(cls, column, min_value=None, max_value=None, strict_min=None, strict_max=None, parse_strings_as_datetimes: Optional[bool] = False, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesDateutilParseable

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.dateutil_parseable
_pandas(cls, column, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesDecreasing

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.decreasing
condition_value_keys = ['strictly', 'parse_strings_as_datetimes']
default_kwarg_values
_pandas(cls, column, **kwargs)
_spark(cls, execution_engine: SparkDFExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[str, Any], runtime_configuration: Dict)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)
class great_expectations.expectations.metrics.ColumnValuesInSet

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.in_set
condition_value_keys = ['value_set']
_pandas(cls, column, value_set, **kwargs)
_sqlalchemy(cls, column, value_set, **kwargs)
_spark(cls, column, value_set, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesInTypeList

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.in_type_list
condition_value_keys = ['type_list']
_pandas(cls, column, type_list, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesIncreasing

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.increasing
condition_value_keys = ['strictly', 'parse_strings_as_datetimes']
default_kwarg_values
_pandas(cls, column, **kwargs)
_spark(cls, execution_engine: SparkDFExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[str, Any], runtime_configuration: Dict)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)
class great_expectations.expectations.metrics.ColumnValuesJsonParseable

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.json_parseable
_pandas(cls, column, **kwargs)
_spark(cls, column, json_schema, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesMatchJsonSchema

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.match_json_schema
condition_value_keys = ['json_schema']
_pandas(cls, column, json_schema, **kwargs)
_spark(cls, column, json_schema, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesMatchLikePattern

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.match_like_pattern
condition_value_keys = ['like_pattern']
_sqlalchemy(cls, column, like_pattern, _dialect, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesMatchLikePatternList

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.match_like_pattern_list
condition_value_keys = ['like_pattern_list', 'match_on']
_sqlalchemy(cls, column, like_pattern_list, match_on, _dialect, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesMatchRegex

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.match_regex
condition_value_keys = ['regex']
_pandas(cls, column, regex, **kwargs)
_sqlalchemy(cls, column, regex, _dialect, **kwargs)
_spark(cls, column, regex, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesMatchRegexList

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.match_regex_list
condition_value_keys = ['regex_list', 'match_on']
default_kwarg_values
_pandas(cls, column, regex_list, match_on, **kwargs)
_sqlalchemy(cls, column, regex_list, match_on, _dialect, **kwargs)
_spark(cls, column, regex_list, match_on, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesMatchStrftimeFormat

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.match_strftime_format
condition_value_keys = ['strftime_format']
_pandas(cls, column, strftime_format, **kwargs)
_spark(cls, column, strftime_format, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesNonNull

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.nonnull
filter_column_isnull = False
_pandas(cls, column, **kwargs)
_sqlalchemy(cls, column, **kwargs)
_spark(cls, column, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesNotInSet

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.not_in_set
condition_value_keys = ['value_set', 'parse_strings_as_datetimes']
_pandas(cls, column, value_set, **kwargs)
_sqlalchemy(cls, column, value_set, **kwargs)
_spark(cls, column, value_set, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesNotMatchLikePattern

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.not_match_like_pattern
condition_value_keys = ['like_pattern']
_sqlalchemy(cls, column, like_pattern, _dialect, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesNotMatchLikePatternList

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.not_match_like_pattern_list
condition_value_keys = ['like_pattern_list', 'match_on']
_sqlalchemy(cls, column, like_pattern_list, _dialect, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesNotMatchRegex

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.not_match_regex
condition_value_keys = ['regex']
_pandas(cls, column, regex, **kwargs)
_sqlalchemy(cls, column, regex, _dialect, **kwargs)
_spark(cls, column, regex, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesNotMatchRegexList

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.not_match_regex_list
condition_value_keys = ['regex_list']
_pandas(cls, column, regex_list, **kwargs)
_sqlalchemy(cls, column, regex_list, _dialect, **kwargs)
_spark(cls, column, regex_list, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesNull

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.null
filter_column_isnull = False
_pandas(cls, column, **kwargs)
_sqlalchemy(cls, column, **kwargs)
_spark(cls, column, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesOfType

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.of_type
condition_value_keys = ['type_']
_pandas(cls, column, type_, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesUnique

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.unique
_pandas(cls, column, **kwargs)
_sqlalchemy_window(cls, column, _table, **kwargs)
_spark(cls, column, **kwargs)
class great_expectations.expectations.metrics.ColumnValuesZScore

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_values.z_score.under_threshold
condition_value_keys = ['double_sided', 'threshold']
default_kwarg_values
function_metric_name = column_values.z_score
function_value_keys
_pandas_function(self, column, _metrics, **kwargs)
_pandas_condition(cls, column, _metrics, threshold, double_sided, **kwargs)
_sqlalchemy_function(cls, column, _metrics, _dialect, **kwargs)
_sqlalchemy_condition(cls, column, _metrics, threshold, double_sided, **kwargs)
_spark_function(cls, column, _metrics, **kwargs)
_spark_condition(cls, column, _metrics, threshold, double_sided, **kwargs)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)

Returns a dictionary of given metric names and their corresponding configuration, specifying the metric types and their respective domains

class great_expectations.expectations.metrics.ColumnPairValuesEqual

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnPairMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_pair_values.equal
condition_domain_keys = ['batch_id', 'table', 'column_A', 'column_B', 'row_condition', 'condition_parser', 'ignore_row_if']
condition_value_keys = []
_pandas(cls, column_A, column_B, **kwargs)
_sqlalchemy(cls, column_A, column_B, **kwargs)
_spark(cls, column_A, column_B, **kwargs)
class great_expectations.expectations.metrics.ColumnPairValuesAGreaterThanB

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnPairMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_pair_values.a_greater_than_b
condition_domain_keys = ['batch_id', 'table', 'column_A', 'column_B', 'row_condition', 'condition_parser', 'ignore_row_if']
condition_value_keys = ['or_equal', 'parse_strings_as_datetimes', 'allow_cross_type_comparisons']
_pandas(cls, column_A, column_B, **kwargs)
_sqlalchemy(cls, column_A, column_B, **kwargs)
_spark(cls, column_A, column_B, **kwargs)
class great_expectations.expectations.metrics.ColumnPairValuesInSet

Bases: great_expectations.expectations.metrics.map_metric_provider.ColumnPairMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = column_pair_values.in_set
condition_value_keys = ['value_pairs_set']
condition_domain_keys = ['batch_id', 'table', 'column_A', 'column_B', 'ignore_row_if']
_pandas(cls, column_A, column_B, **kwargs)
_sqlalchemy(cls, column_A, column_B, **kwargs)
_spark(cls, column_A, column_B, **kwargs)
class great_expectations.expectations.metrics.ColumnMapMetricProvider

Bases: great_expectations.expectations.metrics.map_metric_provider.MapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_domain_keys = ['batch_id', 'table', 'column', 'row_condition', 'condition_parser']
function_domain_keys = ['batch_id', 'table', 'column', 'row_condition', 'condition_parser']
condition_value_keys
function_value_keys
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)
class great_expectations.expectations.metrics.MapMetricProvider

Bases: great_expectations.expectations.metrics.metric_provider.MetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_domain_keys = ['batch_id', 'table', 'row_condition', 'condition_parser']
function_domain_keys = ['batch_id', 'table', 'row_condition', 'condition_parser']
condition_value_keys
function_value_keys
filter_column_isnull = True
SQLALCHEMY_SELECTABLE_METRICS
classmethod _register_metric_functions(cls)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)
static is_sqlalchemy_metric_selectable(map_metric_provider: MetaMetricProvider)
Parameters

map_metric_provider – object of type “MapMetricProvider”, whose SQLAlchemy implementation is inspected

Returns

boolean indicating whether or not the returned value of a method implementing the metric resolves all

columns – hence the caller must not use “select_from” clause as part of its own SQLAlchemy query; otherwise an unwanted selectable (e.g., table) will be added to “FROM”, leading to duplicated and/or erroneous results.

great_expectations.expectations.metrics.column_condition_partial(engine: Type[ExecutionEngine], partial_fn_type: Optional[Union[str, MetricPartialFunctionTypes]] = None, **kwargs)

Provides engine-specific support for authoring a metric_fn with a simplified signature.

A column_condition_partial must provide a map function that evaluates to a boolean value; it will be used to provide supplemental metrics, such as the unexpected_value count, unexpected_values, and unexpected_rows.

A metric function that is decorated as a column_condition_partial will be called with the engine-specific column type and any value_kwargs associated with the Metric for which the provider function is being declared.

Parameters
  • engine

  • partial_fn_type

  • **kwargs

Returns

An annotated metric_function which will be called with a simplified signature.

great_expectations.expectations.metrics.column_function_partial(engine: Type[ExecutionEngine], partial_fn_type: str = None, **kwargs)

Provides engine-specific support for authoring a metric_fn with a simplified signature.

A metric function that is decorated as a column_function_partial will be called with the engine-specific column type and any value_kwargs associated with the Metric for which the provider function is being declared.

Parameters
  • engine

  • partial_fn_type

  • **kwargs

Returns

An annotated metric_function which will be called with a simplified signature.

class great_expectations.expectations.metrics.MetricDomainTypes

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

COLUMN = column
COLUMN_PAIR = column_pair
MULTICOLUMN = multicolumn
TABLE = table
class great_expectations.expectations.metrics.MetricFunctionTypes

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

VALUE = value
MAP_VALUES = value
WINDOW_VALUES = value
AGGREGATE_VALUE = value
class great_expectations.expectations.metrics.MetricPartialFunctionTypes

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

MAP_FN = map_fn
MAP_SERIES = map_series
MAP_CONDITION_FN = map_condition_fn
MAP_CONDITION_SERIES = map_condition_series
WINDOW_FN = window_fn
WINDOW_CONDITION_FN = window_condition_fn
AGGREGATE_FN = aggregate_fn
property metric_suffix(self)
class great_expectations.expectations.metrics.MetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

domain_keys
value_keys
default_kwarg_values
classmethod _register_metric_functions(cls)
classmethod get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)

This should return a dictionary:

{

“dependency_name”: MetricConfiguration, …

}

classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)
great_expectations.expectations.metrics.metric_partial(engine: Type[ExecutionEngine], partial_fn_type: Union[str, MetricPartialFunctionTypes], domain_type: Union[str, MetricDomainTypes], **kwargs)

The metric decorator annotates a method

great_expectations.expectations.metrics.metric_value(engine: Type[ExecutionEngine], metric_fn_type: Union[str, MetricFunctionTypes] = MetricFunctionTypes.VALUE, **kwargs)

The metric decorator annotates a method

class great_expectations.expectations.metrics.CompoundColumnsUnique

Bases: great_expectations.expectations.metrics.map_metric_provider.MulticolumnMapMetricProvider

While the support for “PandasExecutionEngine” and “SparkDFExecutionEngine” is accomplished using a compact implementation, which combines the “map” and “condition” parts in a single step, the support for “SqlAlchemyExecutionEngine” is more detailed. Thus, the “map” and “condition” parts for “SqlAlchemyExecutionEngine” are handled separately, with the “condition” part relying on the “map” part as a metric dependency.

function_metric_name = compound_columns.count
condition_metric_name = compound_columns.unique
condition_domain_keys = ['batch_id', 'table', 'column_list', 'row_condition', 'condition_parser', 'ignore_row_if']
_pandas(cls, column_list, **kwargs)
_sqlalchemy_function(self, column_list, **kwargs)

Computes the “map” between the specified “column_list” (treated as a group so as to model the “compound” aspect) and the number of occurrences of every permutation of the values of “column_list” as the grouped subset of all rows of the table. In the present context, the term “compound” refers to having to treat the specified columns as unique together (e.g., as a multi-column primary key). For example, suppose that in the example below, all three columns (“A”, “B”, and “C”) of the table are included as part of the “compound” columns list (i.e., column_list = [“A”, “B”, “C”]):

A B C _num_rows 1 1 2 2 1 2 3 1 1 1 2 2 2 2 2 1 3 2 3 1

The fourth column, “_num_rows”, holds the value of the “map” function – the number of rows the group occurs in.

_sqlalchemy_condition(cls, column_list, **kwargs)

Retrieve the specified “map” metric dependency value as the “FromClause” “compound_columns_count_query” object and extract from it – using the supported SQLAlchemy column access method – the “_num_rows” columns. The uniqueness of “compound” columns (as a group) is expressed by the “BinaryExpression” “row_wise_cond” returned.

Importantly, since the “compound_columns_count_query” is the “FromClause” object that incorporates all columns of the original table, no additional “FromClause” objects (“select_from”) must augment this “condition” metric. Other than boolean operations, column access, argument of filtering, and limiting the size of the result set, this “row_wise_cond”, serving as the main component of the unexpected condition logic, carries along with it the entire object hierarchy, making any encapsulating query ready for execution against the database engine.

_spark(cls, column_list, **kwargs)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)

Returns a dictionary of given metric names and their corresponding configuration, specifying the metric types and their respective domains.

class great_expectations.expectations.metrics.MulticolumnSumEqual

Bases: great_expectations.expectations.metrics.map_metric_provider.MulticolumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = multicolumn_sum.equal
condition_domain_keys = ['batch_id', 'table', 'column_list', 'row_condition', 'condition_parser', 'ignore_row_if']
condition_value_keys = ['sum_total']
_pandas(cls, column_list, **kwargs)
_sqlalchemy(cls, column_list, **kwargs)
_spark(cls, column_list, **kwargs)
class great_expectations.expectations.metrics.SelectColumnValuesUniqueWithinRecord

Bases: great_expectations.expectations.metrics.map_metric_provider.MulticolumnMapMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

condition_metric_name = select_column_values.unique.within_record
condition_domain_keys = ['batch_id', 'table', 'column_list', 'row_condition', 'condition_parser', 'ignore_row_if']
_pandas(cls, column_list, **kwargs)
_sqlalchemy(cls, column_list, **kwargs)

The present approach relies on an inefficient query condition construction implementation, whose computational cost is O(num_columns^2). However, until a more efficient implementation compatible with SQLAlchemy is available, this is the only feasible mechanism under the current architecture, where map metric providers must return a condition. Nevertheless, SQL query length limit is 1GB (sufficient for most practical scenarios).

_spark(cls, column_list, **kwargs)
class great_expectations.expectations.metrics.TableColumnCount

Bases: great_expectations.expectations.metrics.table_metric_provider.TableMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = table.column_count
_pandas(cls, execution_engine: ExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: ExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: ExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)
class great_expectations.expectations.metrics.ColumnTypes

Bases: great_expectations.expectations.metrics.table_metric_provider.TableMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = table.column_types
value_keys = ['include_nested']
default_kwarg_values
_pandas(cls, execution_engine: PandasExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SparkDFExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
class great_expectations.expectations.metrics.TableColumns

Bases: great_expectations.expectations.metrics.table_metric_provider.TableMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = table.columns
_pandas(cls, execution_engine: PandasExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SparkDFExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
classmethod _get_evaluation_dependencies(cls, metric: MetricConfiguration, configuration: Optional[ExpectationConfiguration] = None, execution_engine: Optional[ExecutionEngine] = None, runtime_configuration: Optional[dict] = None)
class great_expectations.expectations.metrics.TableHead

Bases: great_expectations.expectations.metrics.table_metric_provider.TableMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = table.head
value_keys = ['n_rows', 'fetch_all']
default_kwarg_values
_pandas(cls, execution_engine: PandasExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SparkDFExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
class great_expectations.expectations.metrics.TableRowCount

Bases: great_expectations.expectations.metrics.table_metric_provider.TableMetricProvider

Base class for all metric providers.

MetricProvider classes must have the following attributes set:
  1. metric_name: the name to use. Metric Name must be globally unique in a great_expectations installation.

  1. domain_keys: a tuple of the keys used to determine the domain of the metric

  2. value_keys: a tuple of the keys used to determine the value of the metric.

In some cases, subclasses of Expectation, such as TableMetricProvider will already have correct values that may simply be inherited.

They may optionally override the default_kwarg_values attribute.

MetricProvider classes must implement the following:

1. _get_evaluation_dependencies. Note that often, _get_evaluation_dependencies should augment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies

In some cases, subclasses of Expectation, such as MapMetricProvider will already have correct implementations that may simply be inherited.

Additionally, they may provide implementations of:

1. Data Docs rendering methods decorated with the @renderer decorator. See the guide “How to create renderers for custom expectations” for more information.

metric_name = table.row_count
_pandas(cls, execution_engine: PandasExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[Tuple, Any], runtime_configuration: Dict)