mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-07 16:57:52 +00:00
155 lines
64 KiB
HTML
155 lines
64 KiB
HTML
![]() |
<!doctype html>
|
|||
|
<html lang="en" dir="ltr" class="docs-wrapper docs-doc-page docs-version-1.1.0 plugin-docs plugin-id-default docs-doc-id-docs/tests/metadata-tests" data-has-hydrated="false">
|
|||
|
<head>
|
|||
|
<meta charset="UTF-8">
|
|||
|
<meta name="generator" content="Docusaurus v2.4.3">
|
|||
|
<title data-rh="true">Metadata Tests | DataHub</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://docs.datahub.com/docs/1.1.0/tests/metadata-tests"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="1.1.0"><meta data-rh="true" name="docusaurus_tag" content="docs-default-1.1.0"><meta data-rh="true" name="docsearch:version" content="1.1.0"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-1.1.0"><meta data-rh="true" property="og:title" content="Metadata Tests | DataHub"><meta data-rh="true" name="description" content="DataHub includes a highly configurable, no-code framework that allows you to configure broad-spanning monitors & continuous actions"><meta data-rh="true" property="og:description" content="DataHub includes a highly configurable, no-code framework that allows you to configure broad-spanning monitors & continuous actions"><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://docs.datahub.com/docs/1.1.0/tests/metadata-tests"><link data-rh="true" rel="alternate" href="https://docs.datahub.com/docs/1.1.0/tests/metadata-tests" hreflang="en"><link data-rh="true" rel="alternate" href="https://docs.datahub.com/docs/1.1.0/tests/metadata-tests" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://RK0UG797F3-dsn.algolia.net" crossorigin="anonymous"><link rel="alternate" type="application/rss+xml" href="/learn/rss.xml" title="DataHub RSS Feed">
|
|||
|
<link rel="alternate" type="application/atom+xml" href="/learn/atom.xml" title="DataHub Atom Feed">
|
|||
|
|
|||
|
<link rel="preconnect" href="https://www.google-analytics.com">
|
|||
|
<link rel="preconnect" href="https://www.googletagmanager.com">
|
|||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PKGVLETT4C"></script>
|
|||
|
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-PKGVLETT4C",{})</script>
|
|||
|
<link rel="preconnect" href="https://www.googletagmanager.com">
|
|||
|
<script>window.dataLayer=window.dataLayer||[]</script>
|
|||
|
<script>!function(e,t,a,n,g){e[n]=e[n]||[],e[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var m=t.getElementsByTagName(a)[0],r=t.createElement(a);r.async=!0,r.src="https://www.googletagmanager.com/gtm.js?id=GTM-5M8T9HNN",m.parentNode.insertBefore(r,m)}(window,document,"script","dataLayer")</script>
|
|||
|
|
|||
|
|
|||
|
<link rel="search" type="application/opensearchdescription+xml" title="DataHub" href="/opensearch.xml">
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<meta httpequiv="Content-Security-Policy" content="frame-ancestors 'self' https://*.acryl.io https://acryldata.io http://localhost:*">
|
|||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700&display=swap">
|
|||
|
<script src="https://tools.luckyorange.com/core/lo.js?site-id=28ea8a38" async defer="defer"></script>
|
|||
|
<script src="/scripts/rb2b.js" async defer="defer"></script>
|
|||
|
<script src="https://app.revenuehero.io/scheduler.min.js"></script>
|
|||
|
<script src="https://tag.clearbitscripts.com/v1/pk_2e321cabe30432a5c44c0424781aa35f/tags.js" referrerpolicy="strict-origin-when-cross-origin"></script>
|
|||
|
<script src="/scripts/reo.js"></script>
|
|||
|
<script id="runllm-widget-script" type="module" src="https://widget.runllm.com" crossorigin="true" runllm-name="DataHub" runllm-assistant-id="81" runllm-position="BOTTOM_RIGHT" runllm-keyboard-shortcut="Mod+j" runllm-preset="docusaurus" runllm-theme-color="#1890FF" runllm-brand-logo="https://docs.datahub.com/img/datahub-logo-color-mark.svg" runllm-community-url="https://datahub.com/slack" runllm-community-type="slack" runllm-disable-ask-a-person="true" async></script><link rel="stylesheet" href="/assets/css/styles.d8fe2eb8.css">
|
|||
|
<link rel="preload" href="/assets/js/runtime~main.fbea9251.js" as="script">
|
|||
|
<link rel="preload" href="/assets/js/main.0b27624e.js" as="script">
|
|||
|
</head>
|
|||
|
<body class="navigation-with-keyboard">
|
|||
|
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5M8T9HNN" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
|||
|
|
|||
|
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}return t}()||function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}(),document.documentElement.setAttribute("data-announcement-bar-initially-dismissed",function(){try{return"true"===localStorage.getItem("docusaurus.announcement.dismiss")}catch(t){}return!1}())</script><div id="__docusaurus">
|
|||
|
<div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><div class="announcementBar_mb4j" style="background-color:transparent;color:#ffffff" role="banner"><div class="content_knG7 announcementBarContent_xLdY"><div class="shimmer-banner"><p><strong>Town Hall August 21:</strong> The Latest in DataHub Lineage</p><a href="https://events.datahub.com/august-town-hall-2025?utm_source=webinar&utm_medium=&utm_campaign=17099074-FY25-Q3-Town-Hall" target="_blank" class="button"><div>Save your spot<span> →</span></div></a></div></div></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="https://datahub.com" target="_blank" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="/img/datahub-logo-color-light-horizontal.svg" alt="DataHub Logo" class="themedImage_ToTc themedImage--light_HNdA"><img src="/img/datahub-logo-color-dark-horizontal.svg" alt="DataHub Logo" class="themedImage_ToTc themedImage--dark_i4oU"></div></a><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link versionNavItem_cbn8">1.1.0</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/docs/tests/metadata-tests">Next</a></li><li><a aria-current="page" class="dropdown__link dropdown__link--active" href="/docs/1.1.0/tests/metadata-tests">1.1.0</a></li><li><hr class="dropdown-separator" style="margin: 0.4rem;"></li><li><div class="dropdown__link"><b>Archived versions</b></div></li><li>
|
|||
|
<a class="dropdown__link" href="https://docs-website-t9sv4w3gr-acryldata.vercel.app/docs/features">1.0.0
|
|||
|
<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg>
|
|||
|
</a>
|
|||
|
</li><li>
|
|||
|
<a class="dropdown__link" href="https://docs-website-t9sv4w3gr-acryldata.vercel.app/docs/0.15.0/features">0.15.0
|
|||
|
<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg>
|
|||
|
</a>
|
|||
|
</li><li>
|
|||
|
<a class="dropdown__link" href="https://docs-website-8jkm4uler-acryldata.vercel.app/docs/0.14.1/features">0.14.1
|
|||
|
<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg>
|
|||
|
</a>
|
|||
|
</li><li>
|
|||
|
<a class="dropdown__link" href="https://docs-website-eue2qafvn-acryldata.vercel.app/docs/features">0.14.0
|
|||
|
<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg>
|
|||
|
</a>
|
|||
|
</li><li>
|
|||
|
<a class="dropdown__link" href="https://docs-website-psat3nzgi-acryldata.vercel.app/docs/features">0.13.1
|
|||
|
<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg>
|
|||
|
</a>
|
|||
|
</li><li>
|
|||
|
<a class="dropdown__link" href="https://docs-website-lzxh86531-acryldata.vercel.app/docs/features">0.13.0
|
|||
|
<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg>
|
|||
|
</a>
|
|||
|
</li><li>
|
|||
|
<a class="dropdown__link" href="https://docs-website-2uuxmgza2-acryldata.vercel.app/docs/features">0.12.1
|
|||
|
<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg>
|
|||
|
</a>
|
|||
|
</li><li>
|
|||
|
<a class="dropdown__link" href="https://docs-website-irpoe2osc-acryldata.vercel.app/docs/features">0.11.0
|
|||
|
<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg>
|
|||
|
</a>
|
|||
|
</li><li>
|
|||
|
<a class="dropdown__link" href="https://docs-website-1gv2yzn9d-acryldata.vercel.app/docs/features">0.10.5
|
|||
|
<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg>
|
|||
|
</a>
|
|||
|
</li></ul></div></div><div class="navbar__items navbar__items--right"><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs">Docs</a><a class="navbar__item navbar__link" href="/integrations">Integrations</a><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Learn</a><ul class="dropdown__menu dropdown__menu_Z8FC"><div class="wrapper_kp81"><div><a href="https://datahub.com/weekly-demo" target="_blank" rel="noopener noreferrer" class="card_BUD7"><div class="icon_BgHd"><img src="/img/icon-join-slack.png" alt="Weekly Demo"></div><div class="title_c7DP">Weekly Demo</div></a></div><div><a href="https://datahub.com/use-cases" target="_blank" rel="noopener noreferrer" class="card_BUD7"><div class="icon_BgHd"><img src="/img/icon-forum.png" alt="Use Cases"></div><div class="title_c7DP">Use Cases</div></a></div><div><a href="httpps://datahub.com/adoption-stories" target="_blank" rel="noopener noreferrer" class="card_BUD7"><div class="icon_BgHd"><img src="/img/icon-events.png" alt="Adoption Stories"></div><div class="title_c7DP">Adoption Stories</div></a></div><div><a href="https://medium.com/datahub-project" target="_blank" rel="noopener noreferrer" class="card_BUD7"><div class="icon_BgHd"><img src="/img/icon-champions.png" alt="Blog"></div><div class="title_c7DP">Blog</div></a></div><div><a href="https://www.youtube.com/channel/UC3qFQC5IiwR5fvWEqi_tJ5w" target="_blank" rel="noopener noreferrer" class="card_BUD7"><div class="icon_BgHd"><img src="/img/icon-share-your-journey.png" alt="Youtube"></div><div class="title_c7DP">Youtube</div></a></div></div></ul></div><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Community</a><ul class="dropdown__menu dropdown__menu_Z8FC"><div class="wrapper_kp81"><div><a href="https://datahub.com/slack/" target="_blank" rel="noopener noreferrer" class="card_BUD7"><div class="icon_BgHd"><img src="/img/icon-join-slack.png" alt="Join Slack"></div><div class="title_c7DP">Join Slack</div></a></div><div><a href="https://datahub.com/events" target="_blank" rel="noopener noreferrer" class="card_BUD7"><div class="icon_BgHd"><img src="/img/icon-events.png" alt="Events"></div><div class="title_c7DP">Events</div></a></div><div><a href="https://datahub.com/champions/" target="_blank" rel="noopener noreferrer" class="card_BUD7"><div class="icon_BgHd"><img src="/img/icon-champions.png" alt="Champions"></div><div class="title_c7DP">Champions</div></a></div><div><a href="https://datahub.com/share-your-journey/" target="_blank" rel="noopener noreferrer" class="card_BUD7"><div class="icon_BgHd"><img src="/img/icon-share-your-journey.png" alt="Share Your Journey"></div><div class="title_c7DP">Share Your Journey</div></a></div></div></ul></div><a href="https://datahub.com/products/why-datahub-cloud/" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">
|
|||
|
<style>
|
|||
|
.cloud-cta {
|
|||
|
color: var(--ifm-menu-color-active);
|
|||
|
font-weight: 600;
|
|||
|
background: linear-gradient(40deg, var(--ifm-menu-color-active), var(--ifm-menu-color-active));
|
|||
|
background-size: 200% 100%;
|
|||
|
-webkit-background-clip: text;
|
|||
|
background-clip: text;
|
|||
|
transition: background-image 0.3s ease;
|
|||
|
}
|
|||
|
.cloud-cta:hover {
|
|||
|
color: transparent;
|
|||
|
background: linear-gradient(40deg, var(--ifm-menu-color-active), #ff1493);
|
|||
|
background-size: 200% 100%;
|
|||
|
-webkit-background-clip: text;
|
|||
|
background-clip: text;
|
|||
|
animation: gradientShift 3s ease infinite;
|
|||
|
}
|
|||
|
@keyframes gradientShift {
|
|||
|
0%, 100% { background-position: 0% 50%; }
|
|||
|
50% { background-position: 100% 50%; }
|
|||
|
}
|
|||
|
</style>
|
|||
|
<div class="cloud-cta">Get Cloud</div>
|
|||
|
</a><a href="https://datahub.com/slack?utm_source=docs&utm_medium=header&utm_campaign=docs_header" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">
|
|||
|
<style>
|
|||
|
.slack-logo:hover {
|
|||
|
opacity: 0.8;
|
|||
|
}
|
|||
|
</style>
|
|||
|
<img class="slack-logo" src="https://upload.wikimedia.org/wikipedia/commons/d/d5/Slack_icon_2019.svg" , alt="slack" , height="20px" style="margin: 10px 0 0 0;">
|
|||
|
</a><div class="searchBox_ZlJk"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20" aria-hidden="true"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebarViewport_Xe31"><div class="sidebar_njMd"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG menuWithAnnouncementBar_GW3s"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menuHtmlItem_M9Kj menu__list-item"><div>Getting Started</div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" href="/docs/1.1.0/features">What Is DataHub?</a><button aria-label="Toggle the collapsible sidebar category 'What Is DataHub?'" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--active" aria-expanded="true" href="/docs/1.1.0/category/features">Features</a><button aria-label="Toggle the collapsible sidebar category 'Features'" type="button" class="clean-btn menu__caret"></button></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" tabindex="0" href="/docs/1.1.0/managed-datahub/observe/assertions">Assertions</a><button aria-label="Toggle the collapsible sidebar category 'Assertions'" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/1.1.0/features/feature-guides/access-management">Access Management</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/docs/1.1.0/automations/docs-propagation">Automations</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/1.1.0/businessattributes">Business Attributes</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/1.1.0/glossary/business-glossary">Business Glossary</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/docs/1.1.0/features/feature-guides/c
|
|||
|
for the data assets - datasets, dashboards, charts, pipelines - that make up your enterprise Metadata Graph.
|
|||
|
At the center of this framework is the concept of a Metadata Test.</p><p>There are two powerful use cases that are uniquely enabled by the Metadata Tests framework:</p><ol><li>Automated Asset Classification</li><li>Automated Metadata Completion Monitoring</li></ol><h3 class="anchor anchorWithStickyNavbar_LWe7" id="automated-asset-classification">Automated Asset Classification<a href="#automated-asset-classification" class="hash-link" aria-label="Direct link to Automated Asset Classification" title="Direct link to Automated Asset Classification"></a></h3><p>Metadata Tests allows you to define conditions for selecting a subset of data assets (e.g. datasets, dashboards, etc),
|
|||
|
along with a set of actions to take for entities that are selected. After the test is defined, the actions
|
|||
|
will be applied continuously over time, as the selection set evolves & changes with your data ecosystem.</p><p>When defining selection criteria, you'll be able to choose from a range of useful technical signals (e.g. usage, size) that are automatically
|
|||
|
extracted by DataHub (which vary by integration). This makes automatically classifying the "important" assets in your organization quite easy, which
|
|||
|
is in turn critical for running effective Data Governance initiatives within your organization.</p><p>For example, we can define a Metadata Test which selects all Snowflake Tables which are in the top 10% of "most queried"
|
|||
|
for the past 30 days, and then assign those Tables to a special "Tier 1" group using DataHub Tags, Glossary Terms, or Domains.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="automated-data-governance-monitoring">Automated Data Governance Monitoring<a href="#automated-data-governance-monitoring" class="hash-link" aria-label="Direct link to Automated Data Governance Monitoring" title="Direct link to Automated Data Governance Monitoring"></a></h3><p>Metadata Tests allow you to define & monitor a set of rules that apply to assets in your data ecosystem (e.g. datasets, dashboards, etc). This is particularly useful when attempting to govern
|
|||
|
your data, as it allows for the (1) definition and (2) measurement of centralized metadata standards, which are key for both bootstrapping
|
|||
|
and maintaining a well-governed data ecosystem.</p><p>For example, we can define a Metadata Test which requires that all "Tier 1" data assets (e.g. those marked with a special Tag or Glossary Term),
|
|||
|
must have the following metadata:</p><ol><li>At least 1 explicit owner <em>and</em></li><li>High-level, human-authored documentation <em>and</em></li><li>At least 1 Glossary Term from the "Classification" Term Group</li></ol><p>Then, we can closely monitor which assets are passing and failing these rules as we work to improve things over time.
|
|||
|
We can easily identify assets that are <em>in</em> and <em>out of</em> compliance with a set of centrally-defined standards.</p><p>By applying automation, Metadata Tests
|
|||
|
can enable the full lifecycle of complex Data Governance initiatives - from scoping to execution to monitoring.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="metadata-tests-setup-prerequisites-and-permissions">Metadata Tests Setup, Prerequisites, and Permissions<a href="#metadata-tests-setup-prerequisites-and-permissions" class="hash-link" aria-label="Direct link to Metadata Tests Setup, Prerequisites, and Permissions" title="Direct link to Metadata Tests Setup, Prerequisites, and Permissions"></a></h2><p>What you need to manage Metadata Tests on DataHub:</p><ul><li><strong>Manage Tests</strong> Privilege</li></ul><p>This Platform Privilege allows users to create, edit, and remove all Metadata Tests on DataHub. Therefore, it should only be
|
|||
|
given to those users who will be serving as metadata Admins of the platform. The default <code>Admin</code> role has this Privilege.</p><blockquote><p>Note that the Metadata Tests feature is currently limited in support for the following DataHub Asset Types:</p><ul><li>Dataset</li><li>Dashboard</li><li>Chart</li><li>Data Flow (e.g. Pipeline)</li><li>Data Job (e.g. Task)</li><li>Container (Database, Schema, Project)</li></ul><p>If you'd like to see Metadata Tests for other asset types, please let your DataHub Cloud CustomerSuccess partner know!</p></blockquote><h2 class="anchor anchorWithStickyNavbar_LWe7" id="using-metadata-tests">Using Metadata Tests<a href="#using-metadata-tests" class="hash-link" aria-label="Direct link to Using Metadata Tests" title="Direct link to Using Metadata Tests"></a></h2><p>Metadata Tests can be created by first navigating to <strong>Govern > Tests</strong>.</p><p>To begin building a new Metadata, click <strong>Create new Test</strong>.</p><p align="center"><img loading="lazy" width="80%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/manage-tests.png" class="img_ev3q"></p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="creating-a-metadata-test">Creating a Metadata Test<a href="#creating-a-metadata-test" class="hash-link" aria-label="Direct link to Creating a Metadata Test" title="Direct link to Creating a Metadata Test"></a></h3><p>Inside the Metadata Test builder, we'll need to construct the 3 parts of a Metadata Test:</p><ol><li><strong>Selection Criteria</strong> - Select assets that are in the scope of the test</li><li><strong>Rules</strong> - Define rules that selected assets can either pass or fail</li><li><strong>Actions (Optional)</strong> - Define automated actions to be taken assets that are passing
|
|||
|
or failing the test</li></ol><p align="center"><img loading="lazy" width="80%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/metadata-test-create.png" class="img_ev3q"></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="step-1-defining-selection-criteria-scope">Step 1. Defining Selection Criteria (Scope)<a href="#step-1-defining-selection-criteria-scope" class="hash-link" aria-label="Direct link to Step 1. Defining Selection Criteria (Scope)" title="Direct link to Step 1. Defining Selection Criteria (Scope)"></a></h4><p>In the first step, we define a set of conditions that are used to select a subset of the assets in our Metadata Graph
|
|||
|
that will be "in the scope" of the new test. Assets that <strong>match</strong> the selection conditions will be considered in scope, while those which do not are simply not applicable for the test.
|
|||
|
Once the test is created, the test will be evaluated for any assets which fall in scope on a continuous basis (when an asset changes on DataHub
|
|||
|
or once every day).</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="selecting-asset-types">Selecting Asset Types<a href="#selecting-asset-types" class="hash-link" aria-label="Direct link to Selecting Asset Types" title="Direct link to Selecting Asset Types"></a></h5><p>You must select at least one asset <em>type</em> from a set that includes Datasets, Dashboards, Charts, Data Flows (Pipelines), Data Jobs (Tasks),
|
|||
|
and Containers.</p><p align="center"><img loading="lazy" width="50%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/metadata-test-select-type.png" class="img_ev3q"></p><p>Entities will the selected types will be considered in scope, while those of other types will be considered out of scope and
|
|||
|
thus omitted from evaluation of the test.</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="building-conditions">Building Conditions<a href="#building-conditions" class="hash-link" aria-label="Direct link to Building Conditions" title="Direct link to Building Conditions"></a></h5><p><strong>Property</strong> conditions are the basic unit of comparison used for selecting data assets. Each <strong>Property</strong> condition consists of a target <em>property</em>,
|
|||
|
an <em>operator</em>, and an optional <em>value</em>.</p><p>A <em>property</em> is an attribute of a data asset. It can either be a technical signal (e.g. <strong>metric</strong> such as usage, storage size) or a<br>
|
|||
|
<!-- -->metadata signal (e.g. owners, domain, glossary terms, tags, and more), depending on the asset type and applicability of the signal.
|
|||
|
The full set of supported <em>properties</em> can be found in the table below.</p><p>An <em>operator</em> is the type of predicate that will be applied to the selected <em>property</em> when evaluating the test for an asset. The types
|
|||
|
of operators that are applicable depend on the selected property. Some examples of operators include <code>Equals</code>, <code>Exists</code>, <code>Matches Regex</code>,
|
|||
|
and <code>Contains</code>.</p><p>A <em>value</em> defines the right-hand side of the condition, or a pre-configured value to evaluate the property and operator against. The type of the value
|
|||
|
is dependent on the selected <em>property</em> and <em>operator. For example, if the selected </em>operator<!-- -->*<!-- --> is <code>Matches Regex</code>, the type of the
|
|||
|
value would be a string.</p><p>By selecting a property, operator, and value, we can create a single condition (or predicate) used for
|
|||
|
selecting a data asset to be tested. For example, we can build property conditions that match:</p><ul><li>All datasets in the top 25% of query usage in the past 30 days</li><li>All assets that have the "Tier 1" Glossary Term attached</li><li>All assets in the "Marketing" Domain</li><li>All assets without owners</li><li>All assets without a description</li></ul><p>To create a <strong>Property</strong> condition, simply click <strong>Add Condition</strong> then select <strong>Property</strong> condition.</p><p align="center"><img loading="lazy" width="80%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/metadata-test-create-property-condition.png" class="img_ev3q"></p><p>We can combine <strong>Property</strong> conditions using boolean operators including <code>AND</code>, <code>OR</code>, and <code>NOT</code>, by
|
|||
|
creating <strong>Logical</strong> conditions. To create a <strong>Logical</strong> condition, simply click <strong>Add Condition</strong> then select an
|
|||
|
<strong>And</strong>, <strong>Or</strong>, or <strong>Not</strong> condition.</p><p align="center"><img loading="lazy" width="80%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/metadata-test-create-logical-condition.png" class="img_ev3q"></p><p>Logical conditions allow us to accommodate complex real-world selection requirements:</p><ul><li>All Snowflake Tables that are in the Top 25% of most queried AND do not have a Domain</li><li>All Looker Dashboards that do not have a description authored in Looker OR in DataHub</li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="step-2-defining-rules">Step 2: Defining Rules<a href="#step-2-defining-rules" class="hash-link" aria-label="Direct link to Step 2: Defining Rules" title="Direct link to Step 2: Defining Rules"></a></h4><p>In the second step, we can define a set of conditions that selected assets must match in order to be "passing" the test.
|
|||
|
To do so, we can construct another set of <strong>Property</strong> conditions (as described above).</p><blockquote><p><strong>Pro-Tip</strong>: If no rules are supplied, then all assets that are selected by the criteria defined in Step 1 will be considered "passing".
|
|||
|
If you need to apply an automated Action to the selected assets, you can leave the Rules blank and continue to the next step.</p></blockquote><p align="center"><img loading="lazy" width="50%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/metadata-test-create-rules.png" class="img_ev3q"></p><p>When combined with the selection criteria, Rules allow us to define complex, highly custom <strong>Data Governance</strong> policies such as:</p><ul><li>All datasets in the top 25% of query usage in the past 30 days <strong>must have an owner</strong>.</li><li>All assets in the "Marketing" Domain <strong>must have a description</strong></li><li>All Snowflake Tables that are in the Top 25% of most queried AND do not have a Domain <strong>must have
|
|||
|
a Glossary Term from the Classification Term Group</strong></li></ul><h5 class="anchor anchorWithStickyNavbar_LWe7" id="validating-test-conditions">Validating Test Conditions<a href="#validating-test-conditions" class="hash-link" aria-label="Direct link to Validating Test Conditions" title="Direct link to Validating Test Conditions"></a></h5><p>During Step 2, we can quickly verify that the Selection Criteria & Rules we've authored
|
|||
|
match our expectations by testing them against some existing assets indexed by DataHub.</p><p>To verify your Test conditions, simply click <strong>Try it out</strong>, find an asset to test against by searching & filtering down your assets,
|
|||
|
and finally click <strong>Run Test</strong> to see whether the asset is passes or fails the provided conditions.</p><p align="center"><img loading="lazy" width="80%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/metadata-test-validate-conditions.png" class="img_ev3q"></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="step-3-defining-actions-optional">Step 3: Defining Actions (Optional)<a href="#step-3-defining-actions-optional" class="hash-link" aria-label="Direct link to Step 3: Defining Actions (Optional)" title="Direct link to Step 3: Defining Actions (Optional)"></a></h4><blockquote><p>If you don't wish to take any actions for assets that pass or fail the test, simply click 'Skip'.</p></blockquote><p>In the third step, we can define a set of Actions that will be automatically applied to each selected asset which passes or fails the Rules conditions.</p><p>For example, we may wish to mark <strong>passing</strong> assets with a special DataHub Tag or Glossary Term (e.g. "Tier 1"), or remove these special marking for those which are failing.
|
|||
|
This allows us to automatically control classifications of data assets as they move in and out of compliance with the Rules defined in Step 2.</p><p>A few of the supported Action types include:</p><ul><li>Adding or removing specific Tags</li><li>Adding or removing specific Glossary Terms</li><li>Adding or removing specific Owners</li><li>Adding or removing to a specific Domain</li></ul><p align="center"><img loading="lazy" width="80%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/metadata-test-define-actions.png" class="img_ev3q"></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="step-4-name-category-description">Step 4: Name, Category, Description<a href="#step-4-name-category-description" class="hash-link" aria-label="Direct link to Step 4: Name, Category, Description" title="Direct link to Step 4: Name, Category, Description"></a></h4><p>In the final step, we can add a freeform name, category, and description for our new Metadata Test.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="viewing-test-results">Viewing Test Results<a href="#viewing-test-results" class="hash-link" aria-label="Direct link to Viewing Test Results" title="Direct link to Viewing Test Results"></a></h3><p>Metadata Test results can be viewed in 2 places:</p><ol><li>On an asset profile page (e.g. Dataset profile page), inside the <strong>Validation</strong> tab.</li><li>On the Metadata Tests management page. To view all assets passing or failing a particular test,
|
|||
|
simply click on the labels which showing the number of passing or failing assets.</li></ol><p align="center"><img loading="lazy" width="50%" src="https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/metadata-test-view-results.png" class="img_ev3q"></p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="updating-an-existing-test">Updating an Existing Test<a href="#updating-an-existing-test" class="hash-link" aria-label="Direct link to Updating an Existing Test" title="Direct link to Updating an Existing Test"></a></h3><p>To update an existing Test, simply click <strong>Edit</strong> on the test you wish to change.</p><p>Then, make the changes required and click <strong>Save</strong>. When you save a Test, it may take up to 2 minutes for changes
|
|||
|
to be reflected across DataHub.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="removing-a-test">Removing a Test<a href="#removing-a-test" class="hash-link" aria-label="Direct link to Removing a Test" title="Direct link to Removing a Test"></a></h3><p>To remove a Test, simply click on the trashcan icon located on the Tests list. This will remove the Test and
|
|||
|
deactivate it so that it no is evaluated.</p><p>When you delete a Test, it may take up to 2 minutes for changes to be reflected.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="graphql">GraphQL<a href="#graphql" class="hash-link" aria-label="Direct link to GraphQL" title="Direct link to GraphQL"></a></h3><ul><li><a href="/docs/1.1.0/graphql/queries#listtests">listTests</a></li><li><a href="/docs/1.1.0/graphql/mutations#createtest">createTest</a></li><li><a href="/docs/1.1.0/graphql/mutations#deletetest">deleteTest</a></li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="faq-and-troubleshooting">FAQ and Troubleshooting<a href="#faq-and-troubleshooting" class="hash-link" aria-label="Direct link to FAQ and Troubleshooting" title="Direct link to FAQ and Troubleshooting"></a></h2><p><strong>When are Metadata Tests evaluated?</strong></p><p>Metadata Tests are evaluated in 2 scenarios:</p><ol><li>When an individual asset is changed in DataHub, all tests that include it in scope are evaluated</li><li>On a recurring cadence (usually every 24 hours) by a dedicated Metadata Test evaluator, which evaluates all tests against the Metadata Graph</li></ol><p><strong>Can I configure a custom evaluation schedule for my Metadata Test?</strong></p><p>No, you cannot. Currently, the internal evaluator will ensure that tests are run continuously for
|
|||
|
each asset, regardless of whether it is being changed on DataHub.</p><p><strong>How is a Metadata Test different from an Assertion?</strong></p><p>An Assertion is a specific test, similar to a unit test, that is defined for a single data asset. Typically,
|
|||
|
it will include domain-specific knowledge about the asset and test against physical attributes of it. For example, an Assertion
|
|||
|
may verify that the number of rows for a specific table in Snowflake falls into a well-defined range.</p><p>A Metadata Test is a broad spanning predicate which applies to a subset of the Metadata Graph (e.g. across multiple
|
|||
|
data assets). Typically, it is defined against <em>metadata</em> attributes, as opposed to the physical data itself. For example,
|
|||
|
a Metadata Test may verify that ALL tables in Snowflake have at least 1 assigned owner, and a human-authored description.
|
|||
|
Metadata Tests allow you to manage broad policies across your entire data ecosystem driven by metadata, for example to
|
|||
|
augment a larger scale Data Governance initiative.</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="slackUtm_uoBr"><div class="slackUtm_uoBr"><hr>Need more help? Join the conversation in <a href="https://datahub.com/slack?utm_source=docs&utm_medium=footer&utm_campaign=docs_footer&utm_content=docs/tests/metadata-tests">Slack!</a></div></div><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/datahub-project/datahub/blob/master/docs/tests/metadata-tests.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_VsjB"></div></div></footer><div class="feedbackWrapper_mUHF"><div class="feedbackWidget_PX4d"><div class="feedbackButtons_wn3V"><strong>Is this page helpful?</strong><div><button class="feedbackButton_UgQs"><span role="img" aria-label="like" class="anticon anticon-like"><svg viewBox="64 64 896 896" focusable="false" data-icon="like" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"></path></svg></span></button><button class="feedbackButton_UgQs"><span role="img" aria-label="dislike" class="anticon anticon-dislike"><svg viewBox="64 64 896 896" focusable="false" data-icon="dislike" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M885.9 490.3c3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-51.6-30.7-98.1-78.3-118.4a66.1 66.1 0 00-26.5-5.4H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h129.3l85.8 310.8C372.9 889 418.9 924 470.9 924c29.7 0 57.4-11.8 77.9-33.4 20.5-21.5 31-49.7 29.5-79.4l-6-122.9h239.9c12.1 0 23.9-3.2 34.3-9.3 40.4-23.5 65.5-66.1 65.5-111 0-28.3-9.3-55.5-26.1-77.7zM184 456V172h81v284h-81zm627.2 160.4H496.8l9.6 198.4c.6 11.9-4.7 23.1-14.6 30.5-6.1 4.5-13.6 6.8-21.1 6.7a44.28 44.28 0 01-42.2-32.3L329 459.2V172h415.4a56.85 56.85 0 0133.6 51.8c0 9.7-2.3 18.9-6.9 27.3l-13.9 25.4 21.9 19a56.76 56.76 0 0119.6 43c0 9.7-2.3 18.9-6.9 27.3l-13.9 25.4 21.9 19a56.76 56.76 0 0119.6 43c0 9.7-2.3 18.9-6.9 27.3l-14 25.5 21.9 19a56.76 56.76 0 0119.6 43c0 19.1-11 37.5-28.8 48.4z"></path></svg></span></button></div></div></div></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/1.1.0/features/feature-guides/ui-lineage"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Managing Data Lineage via UI</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/1.1.0/ownership/ownership-types"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Custom Ownership Types</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#automated-asset-c
|
|||
|
<script src="/assets/js/runtime~main.fbea9251.js"></script>
|
|||
|
<script src="/assets/js/main.0b27624e.js"></script>
|
|||
|
</body>
|
|||
|
</html>
|