Table of Contents

Search

  1. Preface
  2. Part 1: Concepts and Models
  3. Part 2: Custom XConnect Created with a Load Template
  4. Appendix A: Resource Configuration File

Metadata Manager Custom Metadata Integration Guide

Metadata Manager Custom Metadata Integration Guide

Elements in a Class Rule

Elements in a Class Rule

You can add specific elements when you define a class rule. You can add an element that uniquely identifies each object in the class. You can also add elements that map object properties to class attributes and create associations and lineage associations between objects.
You can use the following elements in a class rule:
class
The following table describes the attributes for the class element:
Attributes
Description
ruleName
Required. Name of the rule defined for the specified class.
name
Required. Name of the class.
condition
Optional. Condition to apply while loading metadata for the specified class.
id
ID that uniquely identifies each object in the specified class. You can create an expression to uniquely identify each object. The id element does not contain any attributes.
property
To map an object property in the metadata source file to a class attribute, add the property element within the properties element in the class rule.
The following table describes the attribute for the property element:
Element Attribute
Description
name
Required. Name of a class attribute defined in the model. Sample class attributes include name, infa_label, infa_description, and businessName. Map the class attribute to the appropriate column name in the metadata source file.
For example, you create the following class rule:
<class condition="" ruleName="CustomClassRule" name="CustomClass"> <id>ID</id> <properties> <property name="name">NAME</property> <property name="infa_label">LABEL</property> <property name="infa_description">DESCRIPTION</property> <property name="businessName">BUSINESS_NAME</property> <property name="Business Rule">BUSINESS_RULE</property </properties> <associations> </associations> <lineageAssociations> </lineageAssociations> </class>
In this example, the name, infa_label, infa_description, and businessName properties correspond to the default class attributes Name, Label, Description, and Business Name for class CustomClass. The Business Rule property corresponds to a custom class attribute called “Business Rule” that is defined for class CustomClass. The metadata object names come from the NAME column in the metadata source file. Other object attributes come from the LABEL, DESCRIPTION, BUSINESS_NAME, and BUSINESS_RULE columns.
association
You can create associations between objects of the class specified in the class rule and objects of other classes. The child object is of the class specified in the class rule. The parent object is the object specified in the parent element within the association element. To add multiple associations for a class, add multiple association elements within the associations element. The association element does not contain any attributes.
parent
Use the parent element to identify the parent object in a parent-child association. Add the parent element within the association element defined in a class rule.
For example, you create the following class rule:
<loadTemplate name="AS400_1" targetModel="AS400" templateSpecVersion="1.0"> <class ruleName="AS400TableRule" name="AS400Table" condition="TYPE='TABLE'"> <id>PARENT+'~'+ELEMENT</id> <associations> <parent>PARENT</parent> </associations>
In this example, the class rule defines the associations between child objects and parent objects. The child objects come from the ELEMENT column in the metadata source file and are objects of the AS400Table class. The parent objects come from the PARENT column in the metadata source file.
lineageAssociation
You can create lineage associations between objects of the class specified in the class rule and objects of other classes. To add multiple lineage associations for a class, add multiple lineageAssociation elements within the lineageAssociations element.
The following table describes the attribute for the lineageAssociation element:
Element Attribute
Description
direction
Required. Identifies the direction in which data flows between two objects. The direction enables Metadata Manager to display data lineage. Valid values include 'to' and 'from.' You must also specify the target element to which the lineage association applies.
targetElement
The targetElement element identifies the downstream object in a lineage association between two objects. The lineage association represents data flowing from the source object to the target object. Use the targetElement element to define a lineage association between other objects and a specific class of objects. To create the lineage association, add the targetElement element within the lineageAssociation element defined in the class rule.
For example, you create the following class rule:
<loadTemplate name="AS400_1" targetModel="AS400" templateSpecVersion="1.0"> <class ruleName="AS400TableRule" name="AS400Table" condition="TYPE='TABLE'"> <id>PARENT+'~'+ELEMENT</id> <lineageAssociations> <lineageAssociation direction="to"> <linkExpression>LINK_EXPRESSION</linkExpression> <targetElement>TABLE</targetElement> </lineageAssociation> </lineageAssociations>
In this example, the lineage association rule defines lineage associations from source objects to target objects. The source objects come from the ELEMENT column in the metadata source file and are objects of the AS400Table class. The target objects come from the TABLE column in the metadata source file.
linkExpression
The linkExpression element specifies the expression text that appears in the data lineage diagram when you hover over the target object.
For example, you create the following lineage association rule:
<lineageAssociation ruleName="AS400ViewLinkRule"> <linkExpression>LINK_EXPRESSION</linkExpression> <from>FROM_ELEMENT</from> <to>TO_ELEMENT</to> </lineageAssociation>
In this example, the lineage association rule defines lineage associations between source objects in the FROM_ELEMENT column of the metadata source file and target objects in the TO_ELEMENT column of the metadata source file. Text in the LINK_EXPRESSION column appears in the data lineage diagram when you hover over the target objects.

0 COMMENTS

We’d like to hear from you!