Model Definition Language (MDL)

MDL is the proprietary model definition language for Cognos® Transformer. You use MDL to create, manipulate, update, and store models without accessing the user interface. You can set preferences globally and also automate Cognos Transformer functions for greater efficiency.
Tip: You may want to modify the cogtr.xml file, installed in the installation_location/configuration directory, to work more effectively in your particular production environment. For example, you can choose to work in structured MDL rather than verb format.

MDL represents Cognos Transformer models in text format (.mdl) and you can view the text in any text editor. The .py? file is a representation of the model, stored in default binary format. The question mark (?) in the extension .py? is replaced by the character used in your version of Cognos Transformer. Note that it is equivalent to the .mdl file, with the exception of any adjustments made on the user interface and, in some instances, passwords. For more information about Cognos Transformer file formats, see .py? and .mdl formats.

MDL model statements can contain verbs, objects, and options. For example, in the statement DataSourceUpdate 257 "All Staff" SourceType ExcelDatabase

  • DataSourceUpdate is a verb specifying that a data source should be changed
  • 257 is the object identifier and All Staff is its object name, identifying a specific data source object
  • SourceType ExcelDatabase is the option that specifies the type of data source

You can use MDL in two ways:

  • To create an MDL model that completely defines a Cognos Transformer model
  • To create an MDL script that manipulates or updates an existing Cognos Transformer model

These uses can be combined. For example, you can append a script to the end of a model definition.

For examples of MDL scripts, see Sample scripts.