Apply metadata properties and concepts
You can create a metadata domain to have a model available to end-users and applications that allows them to enhance their data. By using formatting, security metadata, and custom metadata, you can produce a more efficient model, with a consistent and clearer view of the data.
A property has an identifier (a key into a map actually) and a value. This collection of properties is the map of attributes that you want to apply to a particular business object, such as a business column or business table. A concept is the metadata you define for your business objects. Each business object (physical table, business table, columns, and so on) has its own concept whose properties override all other inherited or parent concepts.
Concepts can also be defined independent of any business object and can be structured in an inheritance hierarchy for better organization and management of your metadata. These independent concepts can then be applied to one or more business objects as a parent concept.
All physical and some business objects in the metadata model have a set of required properties. These properties are set automatically on creation of the object, and are not removable (although you can change their value). The purpose for required properties is to disallow users from getting into a predicament where they have removed a property that is integral to the SQL generation process. For example, if a physical table did not have a Target Table property set, the SQL generator will cause errors, because it cannot access the correct physical table to query.
If you set a parent concept on the physical table, and the parent concept and the physical table both have the same property, the physical table does not recognize the parent concept's value for that property. This is because the physical table already has the property as part of its self concept, and the self concept always overrides the parent concept. Since you cannot remove a required property, the parent concept's property will never be recognized at the physical level.
To override a physical object's required property, set a parent concept at the business model or business view level. Since you can override the inherited properties, the parent concept at the business level takes priority.
All physical metadata objects, the business categories and the business model have required properties. You can see what's required for each by referring to Required properties per business object.
Use the properties editor
The Business Table Properties dialog box for every business object has two additional lists to the right of the Subject list. These lists are related to concept editing. The two additional lists are the Properties list, and Settings, and they operate in the same way regardless of the object to which you are applying metadata.
The middle panel in the Properties dialog box is the Properties list. This is the list of currently applied metadata properties for the object that is selected in the Subject list. The properties are sorted into their appropriate categories for organization. At the top of the Properties list, there are two icons. The Plus Sign is for adding new metadata properties to this business table's self concept. The X icon is for removing properties from the self concept. Note that the remove button is disabled until a property is selected in the Properties list.
There are four ways a property can show up in the Properties list:
- The property is a default property for the associated business object, and thus cannot be removed.
- The property was inherited from the business object's physical ancestor.
- The property has been set as part of the self concept.
- The property has been set as part of the object's parent concept.
The following color codes alert you to what concept level is in use:
- Yellow icon: This property is inherited from the object's physical ancestor.
- Blue icon: Pentaho sets the property on the object's own concept. This could be overriding an inherited property.
- Orange icon: This property is set as a result of the parent concept applied to the object.
- Purple icon: This is a special icon reserved for security properties.
Settings shows the property name and the associated value for that property in a scrolling list. The properties are displayed in the properties editor in the same order as they appear in the Properties list. If you click on a property in the Properties list, the properties editor scrolls to locate the property in the editor. In the properties editor, you can set or modify the values of the properties applied to the business object.
There are icons in the upper right corner next to any property whose value can be overridden. If you want to modify a property by overriding its inherited value, you must first click the Override icon. To cancel an override, click the Override icon again.
Add a property
Before you begin
In the Properties dialog box, click Add next to Available.The Add New Property dialog box appears. You are prompted with a list of property choices to apply.
Select a property.
Remove a property
In the Properties list, select the property you want to remove.
Click the X icon to remove the property.
As explained in Relational data modeling, three levels of concepts for the business objects in the business model define your metadata. One level is an inherited level, so you need to learn to work with only two concept application processes: self concepts and parent concepts.
Use the Concept Editor
Parent concepts are independent hierarchies of concepts that can be assigned to one or more business objects through the navigation tree. Before you can assign a parent concept you must first learn how to create one.
The Concept Editor allows you to build concepts to be used as parent concepts. The ability to isolate the concepts, name them, then associate the named concept with one or more business objects gives you flexibility and good concept management. Another feature of the Concept Editor is that you can define concepts that build upon other concepts. By nesting concepts this way, you minimize the number of properties you must repeatedly define and create a good inheritance hierarchy.
The default concept
The default concept is the default set of properties assigned to objects, mainly used for formatting. For example, the mask for all currencies could be set to $#,##0.00;($#,##0.00) by default. Every model contains a default concept called Base. This concept is applied as the parent concept to all physical columns created under a connection. The default concept includes metadata properties that are commonly defined and sets a base line set of metadata for all physical columns in the metadata model. The purpose of the default concept is to provide legitimate values for common metadata properties that may not be set in other places in your hierarchy. You can update, add, and delete metadata properties on the default concept. You can also remove the default concept as the parent concept for any and all physical columns. You cannot, however, delete the default concept from the list of concepts in the Concept Editor.
On the main page of the Pentaho Metadata Editor toolbar, click the Pencil icon top open the Concept Editor.
With the Base concept selected in the Concepts list, click the Plus Sign to add concepts. Add a nested concept. Name this concept, Number.
Make sure the Number concept is selected in the Concepts list.Note that the properties from Base have been inherited by Number.
Add a Mask property to Number, with a value of $###,##0.00.
With Number selected in the Concepts list, add another nested concept called ID.
Select ID in the Concepts list, find the inherited Mask property (under Settings).
Click the override icon and enter an override value of 0 (zero) for the mask.NoteYou now have three defined concepts that can be used anywhere in your business model. Each concept serves a different type of business object: Base for default, generic columns; Number for those columns you know contain numeric financial data; and, ID for ID columns.
Click OK to save the concepts.
Add parent concepts
Select any physical table in the navigation tree.In this sample walkthrough exercises the Customers physical table is used.
Expand the columns under the table in navigation tree. Apply the ID concept to the column Customernumber.
Right-click (or CTRL and click) on the column, and select Set Parent Concept from the menu.
Choose the ID concept and click OK.
Remove parent concepts
Select any physical table in the navigation tree.
Expand the columns under the table in navigation tree and select the column that contains the concept you want to remove.
Right-click (or CTRL and click) on the column and select Clear Parent Concept from the menu.