Extending the Database Information Metamodel (DIM) - Teradata Meta Data Services

Teradata Meta Data Services Programmer Guide

Teradata Meta Data Services
Release Number
English (United States)
Last Update
Product Category
Teradata Tools and Utilities

Extending the Database Information Metamodel (DIM)

The DIM is the metamodel that is used to store Teradata physical model meta data in the MDS repository.

MDS provides a utility to read and extract Teradata information and loads the meta data into the DIM. Teradata applications should reference the Teradata meta data in MDS instead of maintaining their own identical meta data. This will reduce meta data redundancy and the number of places that a change must be made. Extending the DIM with relationships to the Teradata meta data provides warehouse users with more information relating to their Teradata active data warehouse.

To extend the DIM is to add new meta data Classes, Properties or Relationships to the DIM. These classes, properties and relationships model additional data to be maintained about the Teradata physical model.

For example, you may want to add a class that stores the source data for each column in the Teradata active data warehouse. A relationship is also needed to join the source information to the column.

For our example, we will create a SourceColumn class and a SourceOfColumn relationship that will relate a SourceColumn to the associated Column.

  • The API to create the class is: CMetaAIM::CreateClassDesc.
  • The API to create the properties of the class are: CMetaClassDesc::CreatePropertyDesc.
  • The API to create the relationship is: CMetaAIM::CreateRelationshipDesc.
  • After these APIs are run, the DIM now looks like Figure 12:

    Figure 12: User Extended DIM

    The Teradata physical databases, tables and columns are loaded into MDS with the metaload utility. To add the ColumnSource data, an application would need to be written to perform the following steps:

    For our example, we assume there is a Teradata Column called T_DEPT,


    Teradata Column

    DatabaseName: Employee

    TableName: TGT_EMP

    ColumnName: T_DEPT

    that has the following source information:


    Source Column

    DatabaseName: ora.emp

    TableName: SRC_EMP

    ElementName: DEPT

    ElementDataType: String

    Using the CMetaObject APIs, an application would be written to:

  • Set the fields for a new ColumnSource object (name=DEPT)
  • Write the new ColumnSource object to the MDS database (See sample code for examples of writing an object)
  • Get the MDSID for the T_DEPT Column in MDS
  • Add the new ColumnSource object (DEPT) to the SourceOfColumn collection for the Column (T_DEPT) object
  • After the ColumnSource objects and collections are created, the MDS repository will contain the information about Columns objects and their source data as in Figure 13.

    Figure 13: New ColumnSource Objects and Collections

    By creating additional classes and relationships in the DIM and creating applications to maintain information the new data, you will be able to build a store of information in MDS. This information provides answers to questions about the warehouse such as where the information came from, when was it last updated, what is the meaning of the data, and so on.