mirror of
https://github.com/datahub-project/datahub.git
synced 2025-09-26 01:23:16 +00:00
1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
"use strict";(self.webpackChunkdocs_website=self.webpackChunkdocs_website||[]).push([[26389],{7653:(e,t,a)=>{a.d(t,{A:()=>r});const r={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"}},4732:(e,t,a)=>{a.d(t,{A:()=>l});var r=a(89379),n=a(96540),o=a(7653),i=a(89990),s=function(e,t){return n.createElement(i.A,(0,r.A)((0,r.A)({},e),{},{ref:t,icon:o.A}))};const l=n.forwardRef(s)},15680:(e,t,a)=>{a.d(t,{xA:()=>u,yg:()=>p});var r=a(96540);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?o(Object(a),!0).forEach((function(t){n(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function s(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},o=Object.keys(e);for(r=0;r<o.length;r++)a=o[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)a=o[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=r.createContext({}),c=function(e){var t=r.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},h="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),h=c(a),d=n,p=h["".concat(l,".").concat(d)]||h[d]||m[d]||o;return a?r.createElement(p,i(i({ref:t},u),{},{components:a})):r.createElement(p,i({ref:t},u))}));function p(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=a.length,i=new Array(o);i[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[h]="string"==typeof e?e:n,i[1]=s;for(var c=2;c<o;c++)i[c]=a[c];return r.createElement.apply(null,i)}return r.createElement.apply(null,a)}d.displayName="MDXCreateElement"},43655:(e,t,a)=>{a.d(t,{A:()=>b});var r=a(96540),n=a(20053);const o="availabilityCard_P5od",i="managedIcon_AxXO",s="platform_wqXv",l="platformAvailable_Y8lN";var c=a(4732),u=a(89379);const h={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};var m=a(89990),d=function(e,t){return r.createElement(m.A,(0,u.A)((0,u.A)({},e),{},{ref:t,icon:h}))};const p=r.forwardRef(d);const g={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z"}}]},name:"cloud",theme:"outlined"};var y=function(e,t){return r.createElement(m.A,(0,u.A)((0,u.A)({},e),{},{ref:t,icon:g}))};const f=r.forwardRef(y),b=({saasOnly:e,ossOnly:t})=>r.createElement("div",{className:(0,n.A)(o,"card")},r.createElement("strong",null,"Feature Availability"),r.createElement("div",null,r.createElement("span",{className:(0,n.A)(s,!e&&l)},"Self-Hosted DataHub ",e?r.createElement(c.A,null):r.createElement(p,null))),r.createElement("div",null,r.createElement(f,{className:i}),r.createElement("span",{className:(0,n.A)(s,!t&&l)},"DataHub Cloud ",t?r.createElement(c.A,null):r.createElement(p,null))))},59154:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>h,contentTitle:()=>c,default:()=>g,frontMatter:()=>l,metadata:()=>u,toc:()=>m});a(96540);var r=a(15680),n=a(43655);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})),e}function s(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},o=Object.keys(e);for(r=0;r<o.length;r++)a=o[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)a=o[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}const l={title:"Schema History",slug:"/schema-history",custom_edit_url:"https://github.com/datahub-project/datahub/blob/master/docs/schema-history.md"},c="Schema History",u={unversionedId:"docs/schema-history",id:"docs/schema-history",title:"Schema History",description:"Schema History is a valuable tool for understanding how a Dataset changes over time and gives insight into the following cases,",source:"@site/genDocs/docs/schema-history.md",sourceDirName:"docs",slug:"/schema-history",permalink:"/docs/schema-history",draft:!1,editUrl:"https://github.com/datahub-project/datahub/blob/master/docs/schema-history.md",tags:[],version:"current",frontMatter:{title:"Schema History",slug:"/schema-history",custom_edit_url:"https://github.com/datahub-project/datahub/blob/master/docs/schema-history.md"},sidebar:"overviewSidebar",previous:{title:"Create and Add a Structured Property",permalink:"/docs/features/feature-guides/properties/create-a-property"},next:{title:"Search",permalink:"/docs/how/search"}},h={},m=[{value:"Schema History Setup, Prerequisites, and Permissions",id:"schema-history-setup-prerequisites-and-permissions",level:2},{value:"Using Schema History",id:"using-schema-history",level:2},{value:"GraphQL",id:"graphql",level:3},{value:"FAQ and Troubleshooting",id:"faq-and-troubleshooting",level:2}],d={toc:m},p="wrapper";function g(e){var{components:t}=e,a=s(e,["components"]);return(0,r.yg)(p,i(function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},r=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),r.forEach((function(t){o(e,t,a[t])}))}return e}({},d,a),{components:t,mdxType:"MDXLayout"}),(0,r.yg)("h1",{id:"schema-history"},"Schema History"),(0,r.yg)(n.A,{mdxType:"FeatureAvailability"}),(0,r.yg)("p",null,"Schema History is a valuable tool for understanding how a Dataset changes over time and gives insight into the following cases,\nalong with informing Data Practitioners when these changes happened."),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"A new field is added"),(0,r.yg)("li",{parentName:"ul"},"An existing field is removed"),(0,r.yg)("li",{parentName:"ul"},"An existing field changes type")),(0,r.yg)("p",null,"Schema History uses DataHub's ",(0,r.yg)("a",{parentName:"p",href:"/docs/dev-guides/timeline/"},"Timeline API")," to compute schema changes."),(0,r.yg)("h2",{id:"schema-history-setup-prerequisites-and-permissions"},"Schema History Setup, Prerequisites, and Permissions"),(0,r.yg)("p",null,"Schema History is viewable in the DataHub UI for any Dataset that has had at least one schema change. To view a Dataset, a user\nmust have the ",(0,r.yg)("strong",{parentName:"p"},"View Entity Page")," privilege, or be assigned to ",(0,r.yg)("strong",{parentName:"p"},"any")," DataHub Role."),(0,r.yg)("h2",{id:"using-schema-history"},"Using Schema History"),(0,r.yg)("p",null,"You can view the Schema History for a Dataset by navigating to that Dataset's Schema Tab. As long as that Dataset has more than\none version, you can view what a Dataset looked like at any given version by using the version selector.\nHere's an example from DataHub's official Demo environment with the"),(0,r.yg)("a",{href:"https://demo.datahub.com/dataset/urn:li:dataset:(urn:li:dataPlatform:snowflake,long_tail_companions.adoption.pets,PROD)/Schema?is_lineage_mode=false"},"Snowflake pets dataset"),".",(0,r.yg)("p",{align:"center"},(0,r.yg)("img",{width:"70%",src:"https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/schema-history-latest-version.png"})),(0,r.yg)("p",null,"If you click on an older version in the selector, you'll be able to see what the schema looked like back then. Notice\nthe changes here to the glossary terms for the ",(0,r.yg)("inlineCode",{parentName:"p"},"status")," field, and to the descriptions for the ",(0,r.yg)("inlineCode",{parentName:"p"},"created_at")," and ",(0,r.yg)("inlineCode",{parentName:"p"},"updated_at"),"\nfields."),(0,r.yg)("p",{align:"center"},(0,r.yg)("img",{width:"70%",src:"https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/schema-history-older-version.png"})),(0,r.yg)("p",null,"In addition to this, you can also toggle the Audit view that shows you when the most recent changes were made to each field.\nYou can active this by clicking on the Audit icon you see above the top right of the table."),(0,r.yg)("p",{align:"center"},(0,r.yg)("img",{width:"70%",src:"https://raw.githubusercontent.com/datahub-project/static-assets/main/imgs/schema-history-audit-activated.png"})),(0,r.yg)("p",null,"You can see here that some of these fields were added at the oldest dataset version, while some were added only at this latest\nversion. Some fields were even modified and had a type change at the latest version!"),(0,r.yg)("h3",{id:"graphql"},"GraphQL"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/docs/graphql/queries#getSchemaBlame"},"getSchemaBlame")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"/docs/graphql/queries#getSchemaVersionList"},"getSchemaVersionList"))),(0,r.yg)("h2",{id:"faq-and-troubleshooting"},"FAQ and Troubleshooting"),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"What updates are planned for the Schema History feature?")),(0,r.yg)("p",null,"In the future, we plan on adding the following features"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"Supporting a linear timeline view where you can see what changes were made to various schema fields over time"),(0,r.yg)("li",{parentName:"ul"},"Adding a diff viewer that highlights the differences between two versions of a Dataset")))}g.isMDXComponent=!0}}]); |