PageSourceSearch

https://docs.greatexpectations.io/assets/js/1d362739.dd727344.js

js greatexpectations.io collected 2026-10-02 02:26:10 UTC 16,949 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkdocs=globalThis.webpackChunkdocs||[]).push([[678],{11470(e,t,n){n.d(t,{A:()=>w});var a=n(96540),o=n(18215),i=n(17559),s=n(23104),r=n(56347),c=n(205),l=n(57485),d=n(31682),u=n(70679);function h(e){return a.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)})?.filter(Boolean)??[]}function p(e){const{values:t,children:n}=e;return(0,a.useMemo)(()=>{const e=t??function(e){return h(e).map(({props:{value:e,label:t,attributes:n,default:a}})=>({value:e,label:t,attributes:n,default:a}))}(n);return function(e){const t=(0,d.XI)(e,(e,t)=>e.value===t.value);if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map(e=>e.value).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e},[t,n])}function _({value:e,tabValues:t}){return t.some(t=>t.value===e)}function f({queryString:e=!1,groupId:t}){const n=(0,r.W6)(),o=function({queryString:e=!1,groupId:t}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!t)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:e,groupId:t});return[(0,l.aZ)(o),(0,a.useCallback)(e=>{if(!o)return;const t=new URLSearchParams(n.location.search);t.set(o,e),n.replace({...n.location,search:t.toString()})},[o,n])]}function m(e){const{defaultValue:t,queryString:n=!1,groupId:o}=e,i=p(e),[s,r]=(0,a.useState)(()=>function({defaultValue:e,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!_({value:e,tabValues:t}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${t.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const n=t.find(e=>e.default)??t[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:i})),[l,d]=f({queryString:n,groupId:o}),[h,m]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[n,o]=(0,u.Dv)(t);return[n,(0,a.useCallback)(e=>{t&&o.set(e)},[t,o])]}({groupId:o}),g=(()=>{const e=l??h;return _({value:e,tabValues:i})?e:null})();(0,c.A)(()=>{g&&r(g)},[g]);return{selectedValue:s,selectValue:(0,a.useCallback)(e=>{if(!_({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);r(e),d(e),m(e)},[d,m,i]),tabValues:i}}var g=n(92303);const x="tabList__CuJ",y="tabItem_LNqP";var b=n(74848);function v({className:e,block:t,selectedValue:n,selectValue:a,tabValues:i}){const r=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.a_)(),l=e=>{const t=e.currentTarget,o=r.indexOf(t),s=i[o].value;s!==n&&(c(t),a(s))},d=e=>{let t=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":{const n=r.indexOf(e.currentTarget)+1;t=r[n]??r[0];break}case"ArrowLeft":{const n=r.indexOf(e.currentTarget)-1;t=r[n]??r[r.length-1];break}}t?.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":t},e),children:i.map(({value:e,label:t,attributes:a})=>(0,b.jsx)("li",{role:"tab",tabIndex:n===e?0:-1,"aria-selected":n===e,ref:e=>{r.push(e)},onKeyDown:d,onClick:l,...a,className:(0,o.A)("tabs__item",y,a?.className,{"tabs__item--active":n===e}),children:t??e},e))})}function j({lazy:e,children:t,selectedValue:n}){const i=(Array.isArray(t)?t:[t]).filter(Boolean);if(e){const e=i.find(e=>e.props.value===n);return e?(0,a.cloneElement)(e,{className:(0,o.A)("margin-top--md",e.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:i.map((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==n}))})}function D(e){const t=m(e);return(0,b.jsxs)("div",{className:(0,o.A)(i.G.tabs.container,"tabs-container",x),children:[(0,b.jsx)(v,{...t,...e}),(0,b.jsx)(j,{...t,...e})]})}function w(e){const t=(0,g.A)();return(0,b.jsx)(D,{...e,children:h(e.children)},String(t))}},15845(e,t,n){n.d(t,{Ay:()=>r});var a=n(74848),o=n(28453),i=n(42386);function s(e){return(0,a.jsx)("span",{children:(0,a.jsx)(i.A,{to:"/core/set_up_a_gx_environment/create_a_data_context?context_type=file",children:"A preconfigured File Data Context"})})}function r(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(s,{...e})}):s()}}
1,19365(e,t,n){n.d(t,{A:()=>s});n(96540);var a=n(18215);const o="tabItem_Ymn6";var i=n(74848);function s({children:e,hidden:t,className:n}){return(0,i.jsx)("div",{role:"tabpanel",className:(0,a.A)(o,n),hidden:t,children:e})}},23069(e,t,n){n.d(t,{Ay:()=>l,RM:()=>r});var a=n(74848),o=n(28453),i=n(42386),s=n(43216);const r=[];function c(e){return(0,a.jsx)("span",{children:(0,a.jsxs)(i.A,{to:"/core/set_up_a_gx_environment/install_python",children:["Python version ",s.A.min_python," to ",s.A.max_python]})})}function l(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(c,{...e})}):c()}},28453(e,t,n){n.d(t,{R:()=>s,x:()=>r});var a=n(96540);const o={},i=a.createContext(o);function s(e){const t=a.useContext(i);return a.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(i.Provider,{value:t},e.children)}},29518(e,t,n){n.r(t),n.d(t,{assets:()=>f,contentTitle:()=>_,default:()=>x,frontMatter:()=>p,metadata:()=>a,toc:()=>m});const a=JSON.parse('{"id":"core/configure_project_settings/configure_data_docs/configure_data_docs","title":"Configure Data Docs","description":"Configure the location where static Data Docs webpages are created.","source":"@site/docs/core/configure_project_settings/configure_data_docs/configure_data_docs.md","sourceDirName":"core/configure_project_settings/configure_data_docs","slug":"/core/configure_project_settings/configure_data_docs/","permalink":"/docs/core/configure_project_settings/configure_data_docs/","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Configure Data Docs","description":"Configure the location where static Data Docs webpages are created.","hide_feedback_survey":false,"hide_title":false},"sidebar":"gx_core","previous":{"title":"Configure project Stores","permalink":"/docs/core/configure_project_settings/configure_metadata_stores/"},"next":{"title":"Configure credentials, tokens, and connection strings","permalink":"/docs/core/configure_project_settings/configure_credentials/"}}');var o=n(74848),i=n(28453),s=n(19365),r=n(11470),c=n(23069),l=n(68362),d=n(15845);function u(e){const t={code:"code",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["A local or networked filesystem Data Doc site requires the following ",(0,o.jsx)(t.code,{children:"store_backend"})," information:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"base_directory"}),": A path to the folder where the static sites should be created.  This can be an absolute path, or a path relative to the root folder of the Data Context."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"class_name"}),": This value must be ",(0,o.jsx)(t.code,{children:"TupleFilesystemStoreBackend"}),", and is not user-configurable."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["To define a Data Docs site configuration for a local or networked filesystem environment, update the value of ",(0,o.jsx)(t.code,{children:"base_directory"})," in the following code and execute it:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",metastring:'title="Python" name="docs/docusaurus/docs/core/configure_project_settings/configure_data_docs/_examples/data_docs_local_or_networked.py - define a data docs config dictionary"',children:'base_directory = "uncommitted/data_docs/local_site/"  # this is the default path (relative to the root folder of the Data Context) but can be changed as required\nsite_config = {\n    "class_name": "SiteBuilder",\n    "site_index_builder": {"class_name": "DefaultSiteIndexBuilder"},\n    "store_backend": {\n        "class_name": "TupleFilesystemStoreBackend",\n        "base_directory": base_directory,\n    },\n}\n'})})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}const p={title:"Configure Data Docs",description:"Configure the location where static Data Docs webpages are created.",hide_feedback_survey:!1,hide_title:!1},_=void 0,f={},m=[{value:"Prerequisites:",id:"prerequisites",level:3},{value:"Procedure",id:"procedure",level:3}];function g(e){const t={code:"code",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"Data Docs translate Expectations, Validation Results, and other metadata into human-readable documentation that is saved as static web pages. Automatically compiling your data documentation from your data tests in the form of Data Docs keeps your documentation current.  This guide covers how to configure Data Docs."}),"\n",(0,o.jsx)(t.h3,{id:"prerequisites",children:"Prerequisites:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(c.Ay,{}),"."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(l.Ay,{}),"."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(d.Ay,{}),".  This guide assumes the variable ",(0,o.jsx)(t.code,{children:"context"})," contains your Data Context."]}),"\n"]}),"\n",(0,o.jsx)(t.h3,{id:"procedure",children:"Procedure"}),"\n",(0,o.jsxs)(r.A,{queryString:"procedure",defaultValue:"instructions",values:[{value:"instructions",label:"Instructions"},{value:"sample_code",label:"Sample code"}],children:[(0,o.jsx)(s.A,{value:"instructions",label:"Instructions",children:(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:"Define a configuration dictionary for your new Data Docs site."}),"\n",(0,o.jsxs)(t.p,{children:["GX writes Data Doc sites to a directory specified by the ",(0,o.jsx)(t.code,{children:"base_directory"})," key of the configuration dictionary.\nConfiguring other keys of the dictionary is not supported, and they may be removed in a future release."]}),"\n",(0,o.jsx)(h,{}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:"Add your configuration to your Data Context."}),"\n",(0,o.jsxs)(t.p,{children:["All Data Docs sites have a unique name within a Data Context. Once your Data Docs site configuration has been defined, add it to the Data Context by updating the value of ",(0,o.jsx)(t.code,{children:"site_name"})," in the following to something more descriptive and then execute the code::"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",metastring:'title="Python" name="docs/docusaurus/docs/core/configure_project_settings/configure_data_docs/_examples/data_docs_local_or_networked.py - add data docs config to Data Context"',children:'site_name = "my_data_docs_site"\ncontext.add_data_docs_site(site_name=site_name, site_config=site_config)\n'})}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:"Optional. Build your Data Docs sites manually."}),"\n",(0,o.jsx)(t.p,{children:"You can manually build a Data Docs site by executing the following code:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",metastring:'title="Python" name="docs/docusaurus/docs/core/configure_project_settings/configure_data_docs/_examples/data_docs_local_or_networked.py - manually build Data Docs"',children:"context.build_data_docs(site_names=site_name)\n"})}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:"Optional. Automate Data Docs site updates with Checkpoint Actions."}),"\n",(0,o.jsxs)(t.p,{children:["You can automate the creation and update of Data Docs sites by including the ",(0,o.jsx)(t.code,{children:"UpdateDataDocsAction"})," in your Checkpoints.  This Action will automatically trigger a Data Docs site build whenever the Checkpoint it is included in completes its ",(0,o.jsx)(t.code,{children:"run()"})," method."]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",metastring:'title="Python" name="docs/docusaurus/docs/core/configure_project_settings/configure_data_docs/_examples/data_docs_local_or_networked.py - automate data docs with a Checkpoint Action"',children:'checkpoint_name = "my_checkpoint"\nvalidation_definition_name = "my_validation_definition"\nvalidation_definition = context.validation_definitions.get(validation_definition_name)\nactions = [\n    gx.checkpoint.actions.UpdateDataDocsAction(\n        name="update_my_site", site_names=[site_name]\n    )\n]\ncheckpoint = context.checkpoints.add(\n    gx.Checkpoint(\n        name=checkpoint_name,\n        validation_definitions=[validation_definition],\n        actions=actions,\n    )\n)\n\nresult = checkpoint.run()\n'})}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:"Optional. View your Data Docs."}),"\n",(0,o.jsx)(t.p,{children:"Once your Data Docs have been created, you can view them with:"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",metastring:'title="Python" name="docs/docusaurus/docs/core/configure_project_settings/configure_data_docs/_examples/data_docs_local_or_networked.py - view data docs"',children:"context.open_data_docs()\n"})}),"\n"]}),"\n"]})}),(0,o.jsx)(s.A,{value:"sample_code",label:"Sample code",children:(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",metastring:'title="Python" name="docs/docusaurus/docs/core/configure_project_settings/configure_data_docs/_examples/data_docs_local_or_networked.py - full code example"',children:'import great_expectations as gx\n\ncontext = gx.get_context(mode="file")\n# Hide this\nset_up_context_for_example(context)\n\n# Define a Data Docs site configuration dictionary\nbase_directory = "uncommitted/data_docs/local_site/"  # this is the default path (relative to the root folder of the Data Context) but can be changed as required\nsite_config = {\n    "class_name": "SiteBuilder",\n    "site_index_builder": {"class_name": "DefaultSiteIndexBuilder"},\n    "store_backend": {\n        "class_name": "TupleFilesystemStoreBackend",\n        "base_directory": base_directory,\n    },\n}\n\n# Add the Data Docs configuration to the Data Context\nsite_name = "my_data_docs_site"\ncontext.add_data_docs_site(site_name=site_name, site_config=site_config)\n\n# Manually build the Data Docs\ncontext.build_data_docs(site_names=site_name)\n\n# Automate Data Docs updates with a Checkpoint Action\ncheckpoint_name = "my_checkpoint"\nvalidation_definition_name = "my_validation_definition"\nvalidation_definition = context.validation_definitions.get(validation_definition_name)\nactions = [\n    gx.checkpoint.actions.UpdateDataDocsAction(\n        name="update_my_site", site_names=[site_name]\n    )\n]\ncheckpoint = context.checkpoints.add(\n    gx.Checkpoint(\n        name=checkpoint_name,\n        validation_definitions=[validation_definition],\n        actions=actions,\n    )\n)\n\nresult = checkpoint.run()\n\n# View the Data Docs\ncontext.open_data_docs()\n'})})})]})]})}function x(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(g,{...e})}):g(e)}},42386(e,t,n){n.d(t,{A:()=>r});n(96540);var a=n(28774),o=n(66588),i=n(56347);var s=n(74848);const r=({to:e,...t})=>{const n=(e=>{if(!e.startsWith("/"))throw Error("paths to useVersionedLink must start with a slash");const{pathname:t}=(0,i.zy)(),{versions:n}=(0,o.P_)("docusaurus-plugin-content-docs");for(const a of Object.values(n))if("/docs"!==a.path&&t.startsWith(`${a.path}/`))return`${a.path}${e}`;return`/docs${e}`})(e);return(0,s.jsx)(a.A,{to:n,...t})}},43216(e,t,n){n.d(t,{A:()=>a});const a={release_version:"great_expectations, version 1.23.2",min_python:"3.10",max_python:"3.13"}},66559(){},68362(e,t,n){n.d(t,{Ay:()=>c,RM:()=>s});var a=n(74848),o=n(28453),i=n(42386);n(66559);const s=[];function r(e){return(0,a.jsx)("span",{children:(0,a.jsx)(i.A,{to:"/core/set_up_a_gx_environment/install_gx",children:"An installation of GX Core"})})}function c(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(r,{...e})}):r()}}}]);

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.