datahub/assets/js/00ca15ec.b56a275e.js
2025-08-22 14:09:31 +00:00

1 line
18 KiB
JavaScript

"use strict";(self.webpackChunkdocs_website=self.webpackChunkdocs_website||[]).push([[52021],{15680:(e,t,n)=>{n.d(t,{xA:()=>d,yg:()=>y});var a=n(96540);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),l=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=l(n),m=r,y=u["".concat(c,".").concat(m)]||u[m]||p[m]||o;return n?a.createElement(y,i(i({ref:t},d),{},{components:n})):a.createElement(y,i({ref:t},d))}));function y(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=m;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:r,i[1]=s;for(var l=2;l<o;l++)i[l]=n[l];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},31539:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>y,frontMatter:()=>s,metadata:()=>l,toc:()=>u});n(96540);var a=n(15680);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function i(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const s={sidebar_position:36,title:"DataContract",slug:"/generated/metamodel/entities/datacontract",custom_edit_url:"https://github.com/datahub-project/datahub/blob/master/docs/generated/metamodel/entities/dataContract.md"},c="DataContract",l={unversionedId:"docs/generated/metamodel/entities/dataContract",id:"docs/generated/metamodel/entities/dataContract",title:"DataContract",description:"Aspects",source:"@site/genDocs/docs/generated/metamodel/entities/dataContract.md",sourceDirName:"docs/generated/metamodel/entities",slug:"/generated/metamodel/entities/datacontract",permalink:"/docs/generated/metamodel/entities/datacontract",draft:!1,editUrl:"https://github.com/datahub-project/datahub/blob/master/docs/generated/metamodel/entities/dataContract.md",tags:[],version:"current",sidebarPosition:36,frontMatter:{sidebar_position:36,title:"DataContract",slug:"/generated/metamodel/entities/datacontract",custom_edit_url:"https://github.com/datahub-project/datahub/blob/master/docs/generated/metamodel/entities/dataContract.md"},sidebar:"overviewSidebar",previous:{title:"BusinessAttribute",permalink:"/docs/generated/metamodel/entities/businessattribute"},next:{title:"EntityType",permalink:"/docs/generated/metamodel/entities/entitytype"}},d={},u=[{value:"Aspects",id:"aspects",level:2},{value:"dataContractProperties",id:"datacontractproperties",level:3},{value:"dataContractStatus",id:"datacontractstatus",level:3},{value:"status",id:"status",level:3},{value:"structuredProperties",id:"structuredproperties",level:3},{value:"Relationships",id:"relationships",level:2},{value:"Outgoing",id:"outgoing",level:3},{value:"Global Metadata Model",id:"global-metadata-model",level:2}],p={toc:u},m="wrapper";function y(e){var{components:t}=e,n=i(e,["components"]);return(0,a.yg)(m,o(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){r(e,t,n[t])}))}return e}({},p,n),{components:t,mdxType:"MDXLayout"}),(0,a.yg)("h1",{id:"datacontract"},"DataContract"),(0,a.yg)("h2",{id:"aspects"},"Aspects"),(0,a.yg)("h3",{id:"datacontractproperties"},"dataContractProperties"),(0,a.yg)("p",null,"Information about a data contract"),(0,a.yg)("details",null,(0,a.yg)("summary",null,"Schema"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-javascript"},'{\n "type": "record",\n "Aspect": {\n "name": "dataContractProperties"\n },\n "name": "DataContractProperties",\n "namespace": "com.linkedin.datacontract",\n "fields": [\n {\n "Relationship": {\n "entityTypes": [\n "dataset"\n ],\n "name": "ContractFor"\n },\n "java": {\n "class": "com.linkedin.common.urn.Urn"\n },\n "type": "string",\n "name": "entity",\n "doc": "The entity that this contract is associated with. Currently, we only support Dataset contracts, but\\nin the future we may also support Data Product level contracts."\n },\n {\n "Relationship": {\n "/*/assertion": {\n "entityTypes": [\n "assertion"\n ],\n "name": "IncludesSchemaAssertion"\n }\n },\n "type": [\n "null",\n {\n "type": "array",\n "items": {\n "type": "record",\n "name": "SchemaContract",\n "namespace": "com.linkedin.datacontract",\n "fields": [\n {\n "Relationship": {\n "entityTypes": [\n "assertion"\n ],\n "name": "IncludesSchemaAssertion"\n },\n "java": {\n "class": "com.linkedin.common.urn.Urn"\n },\n "type": "string",\n "name": "assertion",\n "doc": "The assertion representing the schema contract."\n }\n ],\n "doc": "Expectations for a logical schema"\n }\n }\n ],\n "name": "schema",\n "default": null,\n "doc": "An optional set of schema contracts. If this is a dataset contract, there will only be one."\n },\n {\n "Relationship": {\n "/*/assertion": {\n "entityTypes": [\n "assertion"\n ],\n "name": "IncludesFreshnessAssertion"\n }\n },\n "type": [\n "null",\n {\n "type": "array",\n "items": {\n "type": "record",\n "name": "FreshnessContract",\n "namespace": "com.linkedin.datacontract",\n "fields": [\n {\n "java": {\n "class": "com.linkedin.common.urn.Urn"\n },\n "type": "string",\n "name": "assertion",\n "doc": "The assertion representing the SLA contract."\n }\n ],\n "doc": "A contract pertaining to the operational SLAs of a physical data asset"\n }\n }\n ],\n "name": "freshness",\n "default": null,\n "doc": "An optional set of FRESHNESS contracts. If this is a dataset contract, there will only be one."\n },\n {\n "Relationship": {\n "/*/assertion": {\n "entityTypes": [\n "assertion"\n ],\n "name": "IncludesDataQualityAssertion"\n }\n },\n "type": [\n "null",\n {\n "type": "array",\n "items": {\n "type": "record",\n "name": "DataQualityContract",\n "namespace": "com.linkedin.datacontract",\n "fields": [\n {\n "Relationship": {\n "entityTypes": [\n "assertion"\n ],\n "name": "IncludesDataQualityAssertion"\n },\n "java": {\n "class": "com.linkedin.common.urn.Urn"\n },\n "type": "string",\n "name": "assertion",\n "doc": "The assertion representing the Data Quality contract.\\nE.g. a table or column-level assertion."\n }\n ],\n "doc": "A data quality contract pertaining to a physical data asset\\nData Quality contracts are used to make assertions about data quality metrics for a physical data asset"\n }\n }\n ],\n "name": "dataQuality",\n "default": null,\n "doc": "An optional set of Data Quality contracts, e.g. table and column level contract constraints."\n },\n {\n "type": [\n "null",\n "string"\n ],\n "name": "rawContract",\n "default": null,\n "doc": "YAML-formatted contract definition"\n }\n ],\n "doc": "Information about a data contract"\n}\n'))),(0,a.yg)("h3",{id:"datacontractstatus"},"dataContractStatus"),(0,a.yg)("p",null,"Information about the status of a data contract"),(0,a.yg)("details",null,(0,a.yg)("summary",null,"Schema"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-javascript"},'{\n "type": "record",\n "Aspect": {\n "name": "dataContractStatus"\n },\n "name": "DataContractStatus",\n "namespace": "com.linkedin.datacontract",\n "fields": [\n {\n "Searchable": {\n "/*": {\n "fieldType": "TEXT",\n "queryByDefault": true\n }\n },\n "type": {\n "type": "map",\n "values": "string"\n },\n "name": "customProperties",\n "default": {},\n "doc": "Custom property bag."\n },\n {\n "Searchable": {},\n "type": {\n "type": "enum",\n "symbolDocs": {\n "ACTIVE": "The data contract is active.",\n "PENDING": "The data contract is pending implementation."\n },\n "name": "DataContractState",\n "namespace": "com.linkedin.datacontract",\n "symbols": [\n "ACTIVE",\n "PENDING"\n ]\n },\n "name": "state",\n "doc": "The latest state of the data contract"\n }\n ],\n "doc": "Information about the status of a data contract"\n}\n'))),(0,a.yg)("h3",{id:"status"},"status"),(0,a.yg)("p",null,"The lifecycle status metadata of an entity, e.g. dataset, metric, feature, etc.\nThis aspect is used to represent soft deletes conventionally."),(0,a.yg)("details",null,(0,a.yg)("summary",null,"Schema"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-javascript"},'{\n "type": "record",\n "Aspect": {\n "name": "status"\n },\n "name": "Status",\n "namespace": "com.linkedin.common",\n "fields": [\n {\n "Searchable": {\n "fieldType": "BOOLEAN"\n },\n "type": "boolean",\n "name": "removed",\n "default": false,\n "doc": "Whether the entity has been removed (soft-deleted)."\n }\n ],\n "doc": "The lifecycle status metadata of an entity, e.g. dataset, metric, feature, etc.\\nThis aspect is used to represent soft deletes conventionally."\n}\n'))),(0,a.yg)("h3",{id:"structuredproperties"},"structuredProperties"),(0,a.yg)("p",null,"Properties about an entity governed by StructuredPropertyDefinition"),(0,a.yg)("details",null,(0,a.yg)("summary",null,"Schema"),(0,a.yg)("pre",null,(0,a.yg)("code",{parentName:"pre",className:"language-javascript"},'{\n "type": "record",\n "Aspect": {\n "name": "structuredProperties"\n },\n "name": "StructuredProperties",\n "namespace": "com.linkedin.structured",\n "fields": [\n {\n "type": {\n "type": "array",\n "items": {\n "type": "record",\n "name": "StructuredPropertyValueAssignment",\n "namespace": "com.linkedin.structured",\n "fields": [\n {\n "java": {\n "class": "com.linkedin.common.urn.Urn"\n },\n "type": "string",\n "name": "propertyUrn",\n "doc": "The property that is being assigned a value."\n },\n {\n "type": {\n "type": "array",\n "items": [\n "string",\n "double"\n ]\n },\n "name": "values",\n "doc": "The value assigned to the property."\n },\n {\n "type": [\n "null",\n {\n "type": "record",\n "name": "AuditStamp",\n "namespace": "com.linkedin.common",\n "fields": [\n {\n "type": "long",\n "name": "time",\n "doc": "When did the resource/association/sub-resource move into the specific lifecycle stage represented by this AuditEvent."\n },\n {\n "java": {\n "class": "com.linkedin.common.urn.Urn"\n },\n "type": "string",\n "name": "actor",\n "doc": "The entity (e.g. a member URN) which will be credited for moving the resource/association/sub-resource into the specific lifecycle stage. It is also the one used to authorize the change."\n },\n {\n "java": {\n "class": "com.linkedin.common.urn.Urn"\n },\n "type": [\n "null",\n "string"\n ],\n "name": "impersonator",\n "default": null,\n "doc": "The entity (e.g. a service URN) which performs the change on behalf of the Actor and must be authorized to act as the Actor."\n },\n {\n "type": [\n "null",\n "string"\n ],\n "name": "message",\n "default": null,\n "doc": "Additional context around how DataHub was informed of the particular change. For example: was the change created by an automated process, or manually."\n }\n ],\n "doc": "Data captured on a resource/association/sub-resource level giving insight into when that resource/association/sub-resource moved into a particular lifecycle stage, and who acted to move it into that specific lifecycle stage."\n }\n ],\n "name": "created",\n "default": null,\n "doc": "Audit stamp containing who created this relationship edge and when"\n },\n {\n "type": [\n "null",\n "com.linkedin.common.AuditStamp"\n ],\n "name": "lastModified",\n "default": null,\n "doc": "Audit stamp containing who last modified this relationship edge and when"\n }\n ]\n }\n },\n "name": "properties",\n "doc": "Custom property bag."\n }\n ],\n "doc": "Properties about an entity governed by StructuredPropertyDefinition"\n}\n'))),(0,a.yg)("h2",{id:"relationships"},"Relationships"),(0,a.yg)("h3",{id:"outgoing"},"Outgoing"),(0,a.yg)("p",null,"These are the relationships stored in this entity's aspects"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"ContractFor"),(0,a.yg)("ul",{parentName:"li"},(0,a.yg)("li",{parentName:"ul"},"Dataset via ",(0,a.yg)("inlineCode",{parentName:"li"},"dataContractProperties.entity")))),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"IncludesSchemaAssertion"),(0,a.yg)("ul",{parentName:"li"},(0,a.yg)("li",{parentName:"ul"},"Assertion via ",(0,a.yg)("inlineCode",{parentName:"li"},"dataContractProperties.schema")),(0,a.yg)("li",{parentName:"ul"},"Assertion via ",(0,a.yg)("inlineCode",{parentName:"li"},"dataContractProperties.schema.assertion")))),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"IncludesFreshnessAssertion"),(0,a.yg)("ul",{parentName:"li"},(0,a.yg)("li",{parentName:"ul"},"Assertion via ",(0,a.yg)("inlineCode",{parentName:"li"},"dataContractProperties.freshness")))),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"IncludesDataQualityAssertion"),(0,a.yg)("ul",{parentName:"li"},(0,a.yg)("li",{parentName:"ul"},"Assertion via ",(0,a.yg)("inlineCode",{parentName:"li"},"dataContractProperties.dataQuality")),(0,a.yg)("li",{parentName:"ul"},"Assertion via ",(0,a.yg)("inlineCode",{parentName:"li"},"dataContractProperties.dataQuality.assertion"))))),(0,a.yg)("h2",{id:"global-metadata-model"},(0,a.yg)("a",{parentName:"h2",href:"https://github.com/datahub-project/static-assets/raw/main/imgs/datahub-metadata-model.png"},"Global Metadata Model")),(0,a.yg)("p",null,(0,a.yg)("img",{parentName:"p",src:"https://github.com/datahub-project/static-assets/raw/main/imgs/datahub-metadata-model.png",alt:"Global Graph"})))}y.isMDXComponent=!0}}]);