PageSourceSearch

https://docs.greatexpectations.io/assets/js/ec7da06e.198cda94.js

js greatexpectations.io collected 2026-10-02 02:27:39 UTC 4,972 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkdocs=globalThis.webpackChunkdocs||[]).push([[2122],{2248(e,i,r){r.r(i),r.d(i,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>n,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"reference/api/expectations/metrics/metric_provider/MetricProvider_class","title":"MetricProvider","description":"class greatexpectations.expectations.metrics.metricprovider.MetricProvider#","source":"@site/versioned_docs/version-0.18/reference/api/expectations/metrics/metric_provider/MetricProvider_class.mdx","sourceDirName":"reference/api/expectations/metrics/metric_provider","slug":"/reference/api/expectations/metrics/metric_provider/MetricProvider_class","permalink":"/docs/0.18/reference/api/expectations/metrics/metric_provider/MetricProvider_class","draft":false,"unlisted":false,"tags":[],"version":"0.18","frontMatter":{"title":"MetricProvider","sidebar_label":"MetricProvider"},"sidebar":"gx_apis","previous":{"title":"column_pair_function_partial.py","permalink":"/docs/0.18/reference/api/expectations/metrics/map_metric_provider/column_pair_function_partial"},"next":{"title":"metric_provider.py","permalink":"/docs/0.18/reference/api/expectations/metrics/metric_provider"}}');var t=r(74848),c=r(28453);const n={title:"MetricProvider",sidebar_label:"MetricProvider"},a=void 0,l={},o=[];function d(e){return(0,t.jsx)("section",{class:"sphinx-api-doc",id:"metricprovider",children:(0,t.jsxs)("dl",{class:"py class",children:[(0,t.jsxs)("dt",{class:"sig sig-object py",id:"great_expectations.expectations.metrics.metric_provider.MetricProvider",children:[(0,t.jsxs)("em",{class:"property",children:[(0,t.jsx)("span",{class:"pre",children:"class"}),(0,t.jsx)("span",{class:"w",children:" "})]}),(0,t.jsx)("span",{class:"sig-prename descclassname",children:(0,t.jsx)("span",{class:"pre",children:"great_expectations.expectations.metrics.metric_provider."})}),(0,t.jsx)("span",{class:"sig-name descname",children:(0,t.jsx)("span",{class:"pre",children:"MetricProvider"})}),(0,t.jsx)("a",{class:"headerlink",href:"#great_expectations.expectations.metrics.metric_provider.MetricProvider",title:"Permalink to this definition",children:"#"})]}),(0,t.jsxs)("dd",{children:[(0,t.jsx)("p",{children:"Base class for all metric providers."}),(0,t.jsxs)("dl",{class:"simple",children:[(0,t.jsxs)("dt",{children:["MetricProvider classes ",(0,t.jsx)("em",{children:"must"})," have the following attributes set:"]}),(0,t.jsx)("dd",{children:(0,t.jsxs)("ol",{class:"arabic simple",children:[(0,t.jsx)("li",{children:(0,t.jsxs)("p",{children:[(0,t.jsx)("cite",{children:"metric_name"}),": the name to use. Metric Name must be globally unique in\na great_expectations installation."]})}),(0,t.jsx)("li",{children:(0,t.jsxs)("p",{children:[(0,t.jsx)("cite",{children:"domain_keys"}),": a tuple of the ",(0,t.jsx)("em",{children:"keys"})," used to determine the domain of the\nmetric"]})}),(0,t.jsx)("li",{children:(0,t.jsxs)("p",{children:[(0,t.jsx)("cite",{children:"value_keys"}),": a tuple of the ",(0,t.jsx)("em",{children:"keys"})," used to determine the value of\nthe metric."]})})]})})]}),(0,t.jsx)("p",{children:"In some cases, subclasses of Expectation, such as TableMetricProvider will already\nhave correct values that may simply be inherited."}),(0,t.jsxs)("p",{children:["They ",(0,t.jsx)("em",{children:"may"})," optionally override the ",(0,t.jsx)("cite",{children:"default_kwarg_values"})," attribute."]}),(0,t.jsxs)("dl",{class:"simple",children:[(0,t.jsxs)("dt",{children:["MetricProvider classes ",(0,t.jsx)("em",{children:"must"})," implement the following:"]}),(0,t.jsx)("dd",{children:(0,t.jsxs)("p",{children:["1. ",(0,t.jsx)("cite",{children:"_get_evaluation_dependencies"}),". Note that often, _get_evaluation_dependencies should\naugment dependencies provided by a parent class; consider calling super()._get_evaluation_dependencies"]})})]}),(0,t.jsx)("p",{children:"In some cases, subclasses of Expectation, such as MapMetricProvider will already\nhave correct implementations that may simply be inherited."}),(0,t.jsxs)("dl",{class:"simple",children:[(0,t.jsxs)("dt",{children:["Additionally, they ",(0,t.jsx)("em",{children:"may"})," provide implementations of:"]}),(0,t.jsx)("dd",{children:(0,t.jsx)("p",{children:"1. Data Docs rendering methods decorated with the @renderer decorator. See the guide\n\u201cHow to create renderers for custom expectations\u201d for more information."})})]})]})]})})}function p(e={}){const{wrapper:i}={...(0,c.R)(),...e.components};return i?(0,t.jsx)(i,{...e,children:(0,t.jsx)(d,{...e})}):d()}},28453(e,i,r){r.d(i,{R:()=>n,x:()=>a});var s=r(96540);const t={}
1,c=s.createContext(t);function n(e){const i=s.useContext(c);return s.useMemo(function(){return"function"==typeof e?e(i):{...i,...e}},[i,e])}function a(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:n(e.components),s.createElement(c.Provider,{value:i},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.