Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A data domain (domain) refers to a data model, such as student or course, and is defined by the parties responsible for data governance. The data domain defines the model schema and other attributes for that focus. Common examples of data domains are customers, students, employees, parts, and product orders.

...

Federated domains do not store their data in YOUnite but retrieve and update the data on the systems in which it resides. For example, MIS, ERP, or CRM systems. Federated domains require adaptors, metadata, and governance configurations and are covered in detail *TODO: TUTORIAL ON FEDERATED*

Domain Model Schemas

A domain Model Schema refers to the attributes (properties), format, and other metadata that defines how a specific domain should expect to store the data (either in the YOUnite Data Store or Federated), for the purposes of standardizing how data is exchanged between systems. The Data Governance Steward is responsible for configuring and maintaining domain model schemas. A  domain model schema is a JSON object describing/defining the properties for the domain's schema. The root node of the model schema is the properties element. See Valid Property Names and Valid Types for ModelSchema Properties below.

...

The optional uniquenessRules property is used as an edded added data record identifier to prevent data record duplication.

...

  • MDM provides uniqueness rules to prevent data record duplication in the case where a simple displayProperty won't suffice.
  • Optionally, specify a comma-separated list of domain properties whose values, in aggregate, must be unique across all the data records for the domain.
  • If not no uniquenessRules values are provided, MDM will use the displayProperty as the uniquenessRules.
  • Uniqueness rule properties are limited to type STRING.
  • Values in uniquenessRules properties are case sensitive e.g. "California" is NOT equal to "california"

Federated Domains, Uniqueness Rules, and Required Properties
Anchor
federatedDomainsProperties
federatedDomainsProperties

The goal for federated domains is to keep the combined list of:

  1. Properties in the uniqueness rules to a minimum
  2. Properties defined with the "required" option (see "required" option for properties)  to to a minimum

If the properties list is long, some adaptors associated with the domain might not contain all of the properties and will be unable to add new records to a data domain.

...

  • have governance through ACLs to create data records for that domain
  • stores, or has access to, all of the properties that are defined with the "required" option and that are part of the uniqueness rules list

...

Code Block
"type": "string"
Rules About Required and Default Values
Anchor
requiredValues
requiredValues
  • If a domain property has a default value defined in its modelSchema, then any domain data records posted will use the default value if the property either does not include a value or is sent in with a null value.

For example, if a domain named "College" contains a model schema with a property StateAbbreviation with a default value of "CA",
then any college posted to the College domain without the StateAbbreviation property, or with StateAbbreviation
set with a null value, will use the default value "CA".

...


The property "type": "node" isn't required (or recommended) but can be used for clarity.  If If the   "type" and/or "required"  properties properties are used, the sub-properties must be  contained inside of  the "items" property:

...

PropertyDescription
requiredA non-null value for this item must be provided (false by default). Items inside the container-node can
override the parent container node's required setting.
itemsContains the list of sub-properties in the node. This is required only if the "type", "required", and/or "description" properties are used.

...

PropertyDescription
enumType

Types of enums:

  • int: A numeric whole number.
  • number: A numeric, decimal number with up to 15 bits of precision.
  • string: A string of character variables. 
  • uri: A cross-reference to another domain; use in conjunction with xrefLocation.
xrefLocation

If enumType is set to uri then xrefLocation points to the domain that makes up the elements of the enumeration.

For example, if a version of a domain "countries"contains a list of data record values that represent all countries then a domain can reference it by specifying an enumeration type of uri and the desired domain and version number:

enumType: uri

xrefLocation: /domains/countries:v1

A subset of the data record values in the domain can be specified using the data property.

data
Anchor
enumData
enumData

An array containing a comma-separated list of enum values.

e.g.    "data":["Mays", "McCovey", "Marichal"]

Is a three-item string enumeration.

If the enumType is uri the list of values in the xrefLocation can be limited to the subset of data records whose display values contained in the data array. For example, if /domains/countries:v1 contains a list of all countries but the domain should only reference countries in North America, then the data entries would be:

  "data":["CANADA", "USA", "MEXICO"]

Assuming the display values for Canada, the United States, and Mexico are those shown above in the data elements.

defaultIf the item is not provided or is null, the default value is used.
requiredA non-null value for this item must be provided (false by default).
descriptionA human-readable description of the property.

...

A properly formed Uniform Resource Locator (URL). A URL is a type of Uniform Resource Identifier (URI). By default, a property of type uri can be any valid URI or it can be limited by a regex pattern or to a domain cross-reference (xrefLocation:"xref").

A cross-reference (xref) points to another domain or domain data element. For more on "uriType": "xref" and "xrefLocation" see Cross Domains.

See type enum and the data property to property to limit the cross-reference to a subset of the domain's data records (e.g. if a domain "Company" exists with all Global 1000 companies, an enumeration of EU_Companies could be created referencing only the Global 1000 companies in the European Union).

PropertyDescription
uriTypeThe uri type (e.g. url, blob, xref).

xrefLocation

The location of the domain item or domain item data element.   Used in conjunction with "uritype": "xref".
regexString must match the regex pattern.
defaultIf the item is not provided or is null, the default value is used.
requiredA non-null value for this item must be provided (false by default).
descriptionA human-readable description of the property.

...

For this domain creation example, we'll create an MDM_DATA_STORE data domain. After you create the domain, the section below this covers posting to and retrieving data records.

  1. POST the Domain
  2. POST a Domain Version


  1. POST the Domain 

    For example, to create a simple "states" domain :

    POST /domains

    Code Block
    languagejs
    {
    	"name": "states",
    	"description": "A reference domain of states that should be referenced by all applications in the local YOUnite ecosystem",
    	"zoneUuid": "a1aca070-846f-44e5-9471-c73b46c35f4a",
    	"domainType": "MDM_DATA_STORE"
     }

    The location header returned provides the URI for POSTing a domain version below.

    e.g.   Location /domains/7f28180b-7d9f-42b5-b5ed-d4a0e7ec09fc

  2. POST a Domain Version

POST /domains/versions/7f28180b-7d9f-42b5-b5ed-d4a0e7ec09fc

Code Block
languagetext
{
	"displayProperty": "abbreviation",
	"uniquenessRules": "abbreviation",
	"description": "A reference list of states in the North American States: USA, Mexico and Canada",
	"modelSchema" {
		"properties": {
			"name": {
				"type": "string",
				"description": "The state's official name",
				"min": 2,
				"max": 80,
				"required": true
			},
			"abbreviation": {
				"type": "string",
				"description": "The state's official abbreviation",
				"min": 2,
				"max": 2,
				"required": true
			}
		}
	}
}


The following JSON is another simple example of a model for a domain version.

POST /domains/versions/2a556060-e694-4b61-a3bb-67beda37da13

Code Block
languagetext
{
	"displayProperty": "countrycode",
	"modelSchema" {
		"properties": {
			"name": {
				"type": "string",
				"min": 2,
				"max": 80,
				"required": true
			},
			"countrycode": {
				"type": "string",
				"min": 3,
				"max": 3,
				"required": true,
				"description": "ISO Standard 3-character Country Code"
			},
			"population": {
				"type": "int",
				"required": false
			},
			"capital": {
				"city": {
					"type": "string",
					"required": true
				},
				"districtOrState": {
					"type": "string",
					"required": true
				}
			}
		}
	}
}

Note: Inside the value portion of the modelSchema node, all of the double quotes must be escaped with a backslash (\). Newlines have been added above for readability but they should not be included in the request body. The request should look like this:

Code Block
languagetext
{
    "name": "countries",
	"displayProperty": "countrycode"
	"modelSchema": "{ \"properties\": { \"name\": { \"type\": \"string\", \"min\": 2, \"max\": 80, \"required\": true }, \"countrycode\": { \"type\": \"string\", \"min\": 3, \"max\": 3, \"required\": true, \"description\": \"ISO Standard 3-character Country Code\" }, \"population\": { \"type\": \"int\", \"required\": false }, \"capital\": { \"city\": { \"type\": \"string\", \"required\": true }, \"districtOrState\": { \"type\": \"string\", \"required\": true } } } }"
}


The response code on success is: 201 CREATED

Posting Data Records to the Domain
Anchor
postDR
postDR

...

Retrieving Data Records from the Domain
Anchor
retrieveDR
retrieveDR

The data records for a the default version of a domain can be retrieved with the following:

...