great_expectations.expectations.metrics.query_metrics.query_column_pair

Module Contents

Classes

QueryColumnPair()

Base class for all Query Metrics.

class great_expectations.expectations.metrics.query_metrics.query_column_pair.QueryColumnPair

Bases: great_expectations.expectations.metrics.query_metric_provider.QueryMetricProvider

Base class for all Query Metrics.
Query Metric classes inheriting from QueryMetricProvider 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 MetricProvider, such as QueryMetricProvider, will already have correct values that may simply be inherited by Metric classes.

metric_name = query.column_pair
value_keys = ['column_A', 'column_B', 'query']
_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)