Skip to main content
Version: 0.17.23

QueryMetricProvider

class great_expectations.expectations.metrics.query_metric_provider.QueryMetricProvider#

Base class for all Query Metrics, which define metrics to construct SQL queries.

An example of this is query.table, which takes in a SQL query & target table name, and returns the result of that query.

In some cases, subclasses of MetricProvider, such as QueryMetricProvider, will already have correct values that may simply be inherited by Metric classes.

-Relevant Documentation Links -
Parameters:
  • metric_name (str) – A name identifying the metric. Metric Name must be globally unique in a great_expectations installation.

  • domain_keys (tuple) – A tuple of the keys used to determine the domain of the metric.

  • value_keys (tuple) – A tuple of the keys used to determine the value of the metric.

  • query (str) – A valid SQL query.