great_expectations.expectations.metrics.column_aggregate_metrics

Package Contents

Classes

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.

class great_expectations.expectations.metrics.column_aggregate_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[str, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SqlAlchemyExecutionEngine, 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)

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

class great_expectations.expectations.metrics.column_aggregate_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[str, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SqlAlchemyExecutionEngine, 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)

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

class great_expectations.expectations.metrics.column_aggregate_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[str, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[str, 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[str, Any], runtime_configuration: Dict)
class great_expectations.expectations.metrics.column_aggregate_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.column_aggregate_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.column_aggregate_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[str, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SqlAlchemyExecutionEngine, 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)

This should return a dictionary: {

“dependency_name”: MetricConfiguration, …

}

class great_expectations.expectations.metrics.column_aggregate_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.column_aggregate_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[str, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, 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)

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

class great_expectations.expectations.metrics.column_aggregate_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.column_aggregate_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[str, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: PandasExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[str, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: PandasExecutionEngine, 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.column_aggregate_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.column_aggregate_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[str, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[str, Any], runtime_configuration: Dict)
class great_expectations.expectations.metrics.column_aggregate_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.column_aggregate_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.column_aggregate_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[str, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[str, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SparkDFExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[str, Any], runtime_configuration: Dict)
class great_expectations.expectations.metrics.column_aggregate_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[str, Any], runtime_configuration: Dict)
_sqlalchemy(cls, execution_engine: SqlAlchemyExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[str, Any], runtime_configuration: Dict)
_spark(cls, execution_engine: SparkDFExecutionEngine, metric_domain_kwargs: Dict, metric_value_kwargs: Dict, metrics: Dict[str, Any], runtime_configuration: Dict)