Example - MDL model using an IBM Cognos data source in structured MDL

This is the order in which you would create a typical model using structured MDL:
  • Create the data sources in Cognos® Transformer.
  • Create the dimensions and key performance measures.
  • Create the standard dimension views.
  • Create dimension views and custom views.
  • Add the namespace and security objects.
  • Populate the model and create the PowerCube.

The following example shows a model, created using an IBM® Cognos data source, in structured MDL format.

Structured MDL Description

CognosSource 103 
"GO Sales and Retailers"
 SourceType Package 
SourcePath "/content/package[@name='GO
Sales and Retailers']" PackageTimeStamp 
"/content/package[@name='GO Sales and 
Retailers']/model[@name='model']" 

CognosSource defines an IBM Cognos package or report as the data source in the model.

"Go Sales and Retailers" is the name of the IBM Cognos package. All packages and queries must have unique names.

SourceType defines the type of IBM Cognos data source. The type can be Package, Report, or CognosSourceQuery. In this example, SourceType defines a package data source type.

SourcePath is the path to the IBM Cognos package stored in Content Manager.

PackageTimeStamp is the version of the package last used in the model.


CognosSource 11543
"QuantityReport" 

SourceType Report 
SourcePath

"/content/package[@name=
'GO Sales and Retailers']/report[@name=
'QuantityReport']" PackageTimeStamp
"/content/package[@name=
'GO Sales and Retailers']/report[@name=
'QuantityReport']"

CognosSource defines a second IBM Cognos package or report data source in the model.

In this example, the SourceType defines a report data source type.

DataSource 105 
"GO Sales and Retailers~1" 
Separator "," 
SourceType CognosSourceQuery

CharacterSet Default DecimalSep "." 
Thousandsep "," Columns True Timing
PopYesCreateDefault 
PackageReportSource 103 
"GO Sales and Retailers" 
AutoSummary True SetCurrent True 
ServerSource False Speed False 
Presummarized False 

CognosSourceQuery defines a query defined against a package or report SourceType.

PackageReportSource 103 "GO Sales and Retailers" is the reference to the package on which this query is defined.


OrgName 107 "[gosales_goretailers].
[Orders].[Order number]" Origin Source 
Offset 0 
Column "Order number" Storage Float64 
Scale 0 
Size 4 Decimals 0 InputScale 0 
TimeArray Off 
Rollup CountAll 

"[gosales_goretailers].[Orders].[Order number]" is the reference within the package or report to the query item or measure on which this column is defined.

Following are more references to query items or measures on which the columns are defined.

OrgName 109 "[gosales_goretailers].
[Orders].[Retailer name]" Origin Source 
Offset 1 
Column "Retailer name" Storage Text 
Scale 0 Size 102 Decimals 0 
Class Description InputScale 0 
TimeArray Off 
 
OrgName 111 "[gosales_goretailers].
[Orders].[Order date]" Origin Source 
Offset 2 Column "Order date" 
Storage Int32 Scale 0 Size 12 Decimals 0 
Class Date InputScale 0 TimeArray Off 
 
OrgName 113 "[gosales_goretailers].
[Orders].[Order method]" Origin
Source Offset 3 Column "Order method" 
Storage Text Scale 0 Size 102 Decimals 0 
Class Description InputScale 0 
TimeArray Off 
 
OrgName 115 "[gosales_goretailers].
[Orders].[Order method code]" 
Origin Source Offset 4 Column 
"Order method code" Storage Float64 
Scale 0 Size 4 Decimals 0 
InputScale 0 TimeArray Off Rollup 
CountAll 
 
OrgName 117 "[gosales_goretailers].
[Orders].[Product name]"Origin Source 
Offset 5 Column "Product name" 
Storage Text Scale 0 Size 102 Decimals 0 
Class Description InputScale 0 
TimeArray Off 
 
OrgName 119 "[gosales_goretailers].
[Orders].[Quantity]" Origin Source 
Offset 6 Column "Quantity" 
Storage Float64 Scale 0 Size 2 
Decimals 0  
Class Quantity InputScale 0 
TimeArray Off 
Rollup Sum 
 

Filter 11553 "Americas"

FilterRef "[gosales_goretailers].
[Americas]"

Filter 115533 "Americas" selects a filter from the data source and imports it into the query.

FilterRef "[gosales_goretailers].[Americas]" is the reference within the package or report to the filter on which this column is defined.

DataSource 11545 "QuantityReport~1"
Separator "," SourceType 
CognosSourceQuery CharacterSet Default
DecimalSep "." Thousandsep "," 
Columns True 
Timing PopYesCreateDefault 

PackageReportSource 11543 
"QuantityReport" AutoSummary False 
SetCurrent True 
ServerSource False 
Speed False 
Presummarized False 

PackageReportSource 11543 "QuantityReport" is a second query, defined against a second package.

Following are more references to query items or measures on which the columns are defined.

OrgName 11547 "[Report].[Query1.0].
[Product number]" 
Origin Source Offset 0 Column 
"Product number" Storage Float64 Scale 0 
Size 1 Decimals 0 
Class Quantity InputScale 0 
TimeArray Off 
 
OrgName 11549 "[Report].[Query1.0].
[Production cost]" 
Origin Source Offset 1 
Column "Production cost" Storage Float64 
Scale 2 Size 1 Decimals 2 
Class Quantity InputScale 0 
TimeArray Off 
 
Dimension 149 "Order date" DimType 
Date EarliestDate 19010101 
LatestDate 21001231 ManualPeriods False 
DaysInWeek 127 NewCatsLock False 
ExcludeAutoPartitioning False 
DimDefaultCategory 0 
 
Categories Root 153 "Order date"
Inclusion Generate Lastuse 20070910 
Date 0 
Filtered False Suppressed False 
Sign False
HideValue False 
IsKeyOrphanage False 
IsTruncated False
Blanks False 
Drill 155 "By Order date" Inclusion 
Suppress Filtered False Suppressed True 
PrimaryDrill True HideValue False
YearBegins 20070101 
PartialWeek Split ExtraWeek None 
WeekBegins Sunday
Levels 161 "Year" Blanks "( blank )" 
Inclusion Generate DateFunction Year 
Generate Need RefreshLabel False 
RefreshDescription False
RefreshShortName False 
 
NewCatsLock False CatLabFormat
"YYYY"
Timerank 10 UniqueCategories True
UniqueMove False
Associations 163 "Order date"
AssociationType Type_Query 
AssociationRole Role_Source 
AssociationReferenced "Order date" 
Associations 165 "Order date" 
AssociationContext 155 AssociationType 
Type_Query AssociationRole Role_OrderBy 
AssociationReferenced "Order date" 
SortOrder Int16 SortAs Ascending 

UniqueCategories True indicates that the Product Id level is unique. This is necessary because the level is associated with columns from multiple queries.

Levels 167 "Quarter" Blanks "( blank)" 
Inclusion Generate DateFunction Quarter 
Generate All RefreshLabel False 
RefreshDescription False Refresh
ShortName False NewCatsLock False 
CatLabFormat 'YYYY "Q" Q' 
Timerank 20 UniqueCategories True
UniqueMove False 
Associations 169 "Order date" 
AssociationType Type_Query 
AssociationRole Role_Source 
AssociationReferenced "Order date" 
Associations 171 "Order date" 
AssociationContext 155 
AssociationType Type_Query 
AssociationRole Role_OrderBy
AssociationReferenced "Order date" 
SortOrder Int16 SortAs Ascending 
 
Category 233 "20040101-20041231" 
Parent 155 Levels 161 OrderBy Drill 155 
Value "2004" Label "2004" 
Lastuse 20070910 SourceValue "2004" 
Date 20040101 Filtered False 
Suppressed False Sign False HideValue 
False IsKeyOrphanage False IsTruncated 
False Blanks False Category 235 
"20040101-20040331" Parent 233 
Levels 167 OrderBy Drill 155 
Value "20040101" Label "2004 Q 1" 
Lastuse 20070910 SourceValue "20040101" 
Date 20040101 Filtered False 
Suppressed False Sign False HideValue 
False IsKeyOrphanage False IsTruncated 
False Blanks False
 
Category 243 "20040401-20040630" 
Parent 233 Levels 167 OrderBy Drill 155 
Value "20040401" Label "2004 Q 2" 
Lastuse 20070910 SourceValue "20040401" 
Date 20040401 Filtered False 
Suppressed False Sign False 
HideValue False IsKeyOrphanage False 
IsTruncated False Blanks False
 
Category 251 "20040701-20040930"
Parent 233 Levels 167 OrderBy Drill 155 
Value "20040701" Label "2004 Q 3" 
Lastuse 20070910 SourceValue "20040701" 
Date 20040701 Filtered False 
Suppressed False Sign False 
HideValue False IsKeyOrphanage False
IsTruncated False Blanks False 
 
Category 259 "20041001-20041231" 
Parent 233 Levels 167 OrderBy Drill 155 
Value "20041001" Label "2004 Q 4" 
Lastuse 20070910 preserve">SourceValue 
"20041001" Date 20041001 Filtered False
Suppressed False Sign False 
HideValue False IsKeyOrphanage 
False IsTruncated False Blanks False
 
Category 581 "20050101-20051231" 
Parent 155 Levels 161 OrderBy Drill 155 
Value "2005" Label "2005" 
Lastuse 20070910 SourceValue "2005" 
Date 20050101 Filtered False 
Suppressed False Sign False 
HideValue False IsKeyOrphanage False 
IsTruncated False Blanks False 
Category 583 "20050101-20050331" 
Parent 581 Levels 167 OrderBy Drill 155
Value "20050101" Label "2005 Q 1" 
Lastuse 20070910 SourceValue "20050101"
Date 20050101 Filtered False 
Suppressed False Sign False 
HideValue False
IsKeyOrphanage False 
IsTruncated False Blanks False
 
Category 591 "20050401-20050630" 
Parent 581 Levels 167 OrderBy Drill 155
Value "20050401" Label "2005 Q 2" 
Lastuse 20070910 SourceValue "20050401"
Date 20050401 Filtered False 
Suppressed False Sign False 
HideValue False IsKeyOrphanage False 
IsTruncated False Blanks False 
 
Category 599 "20050701-20050930" 
Parent 581 Levels 167 OrderBy Drill 155
Value "20050701" Label "2005 Q 3" 
Lastuse 20070910 SourceValue "20050701"
Date 20050701 Filtered False 
Suppressed False Sign False 
HideValue False IsKeyOrphanage False 
IsTruncated False Blanks False 
 
Category 607 "20051001-20051231" 
Parent 581 Levels 167 OrderBy Drill 155
Value "20051001" Label "2005 Q 4" 
Lastuse 20070910 SourceValue "20051001"
Date 20051001 Filtered False
Suppressed False Sign False 
HideValue False IsKeyOrphanage False 
IsTruncated False Blanks False 
 
Category 683 "20060101-20061231" 
Parent 155 Levels 161 OrderBy Drill 155
Value "2006" Label "2006" 
Lastuse 20070910 SourceValue "2006" 
Date 20060101 Filtered False
Suppressed False Sign False 
HideValue False IsKeyOrphanage False
IsTruncated False Blanks False 
Category 685 "20060101-20060331" 
Parent 683 
Levels 167 OrderBy Drill 155 
Value "20060101" 
Label "2006 Q 1" Lastuse 20070910
SourceValue "20060101" 
Date 20060101 Filtered False 
Suppressed False
Sign False HideValue False 
IsKeyOrphanage False IsTruncatedFalse 
Blanks False
 
Category 693 "20060401-20060630"
Parent 683 Levels 167 OrderBy Drill 155 
Value "20060401" Label "2006 Q 2" 
Lastuse 20070910 SourceValue "20060401" 
Date 20060401 
Filtered False Suppressed False 
Sign False HideValue False 
IsKeyOrphanage False IsTruncated False
Blanks False
 
Category 701 "20060701-20060930"
Parent 683 
Levels 167 
OrderBy Drill 155 Value "20060701" 
Label "2006 Q 3" Lastuse 20070910
SourceValue "20060701" 
Date 20060701 Filtered False 
Suppressed False Sign False 
HideValue False IsKeyOrphanage False
IsTruncated False Blanks False 
 
Category 709 "20061001-20061231"
Parent 683 
Levels 167 OrderBy Drill 155 
Value "20061001" 
Label "2006 Q 4" Lastuse 20070910 
SourceValue "20061001" Date 20061001 
Filtered False Suppressed False 
Sign False HideValue False 
IsKeyOrphanage False IsTruncated False 
Blanks False
 
MapDrills MapDrill 155 
 
ViewName 157 "All Categories" Type 
All ViewCustomView 0 
 
ViewName 159 "Omit Dimension" Type 
Omit ViewCustomView 0 
 
Dimension 195 "Order method" 
DimType Regular NewCatsLock False 
ExcludeAutoPartitioning False 
DimDefaultCategory 0 
 
Categories Root 197 "Order method" 
Inclusion Generate Lastuse 20070910 
Filtered False 
Suppressed False Sign False 
HideValue False IsKeyOrphanage False 
IsTruncated False
Blanks False Drill 199 "By Order method"
Inclusion Suppress Filtered False
Suppressed True 
PrimaryDrill True HideValue False
 Levels 205 "Order method" 
Blanks "( Blank )" DateFunction None 
Generate None 
RefreshLabel False 
RefreshDescription False 
RefreshShortName False 
NewCatsLock False 
Timerank 0 UniqueCategories False 
UniqueMove False Associations 207 
"Order method code" 
AssociationType Type_Query 
AssociationRole Role_Source 
AssociationReferenced 
"Order method code" 
 
Associations 209 "Order method" 
AssociationType Type_Query 
AssociationRole Role_Label 
AssociationReferenced "Order method" 
 
Category 267 "7" Parent 199 Levels
205 
Label "Sales visit" Lastuse 20070910 
SourceValue "7" 
Filtered False Suppressed False 
Sign False HideValue False 
IsKeyOrphanage False IsTruncated False 
Blanks False 
 
Category 285 "4" Parent 199 
Levels 205 Label "E-mail" 
Lastuse 20070910 SourceValue "4" 
Filtered False Suppressed False 
Sign False HideValue False 
IsKeyOrphanage False 
IsTruncated False Blanks False 
 
Category 309 "5" Parent 199 Levels
205 
Label "Web" Lastuse 20070910 
SourceValue "5" Filtered False 
Suppressed False Sign False 
HideValue False IsKeyOrphanage False 
IsTruncated False Blanks False 
 
Category 319 "2" Parent 199 Levels
205 
Label "Telephone" Lastuse 20070910 
SourceValue "2" Filtered False 
Suppressed False Sign False 
HideValue False IsKeyOrphanage False 
IsTruncated False Blanks False 
 
Category 357 "1" Parent 199 Levels
205 
Label "Fax" Lastuse 20070910 
SourceValue "1" Filtered False 
Suppressed False Sign False 
HideValue False IsKeyOrphanage False 
IsTruncated False Blanks False 
 
Category 437 "3" Parent 199 Levels
205 
Label "Mail" Lastuse 20070910 
SourceValue "3" Filtered False 
Suppressed False Sign False 
HideValue False IsKeyOrphanage False 
IsTruncated False Blanks False 
 
Category 475 "8" Parent 199 Levels
205 Label "Special" 
Lastuse 20070910 SourceValue "8" 
Current Filtered False 
Suppressed False Sign False 
HideValue False IsKeyOrphanage False 
IsTruncated False Blanks False 
 
MapDrills MapDrill 199 
 

ViewName 201 "All Categories"
 Type All ViewCustomView 0 

ViewName 203 "Omit Dimension"  
Type Omit ViewCustomView
0

These are the two standard views created for all dimensions.

If you do not manually create the two default dimension views required for each dimension (All Categories and Omit Dimension), you must use the ModelEnsureCompleteness script to have Cognos Transformer create them automatically.


ViewName 11555 "Authors~User
View"
 ViewCustomView 11529
 Apex
197 Filter 319

ViewName 11555 "Authors~User View" creates a customized dimension view.

ViewCustomView 11529 is a reference to the view that this custom view uses in the dimension.

Apex 197 Filter 319 is a list of the categories that have customization options set, such as apexing or cloaking.

ViewName 11557 "Sub Authors~User
View" 
ViewCustomView 11537 Apex 197 Filter 319 
 
Measure 225 "Quantity" Rollup Sum 
IgnoreMissingValue False Storage Float64 
OutPutScale 0 Decimals 0 
ReverseSign False 
IsCurrency False IsFolder False 
DrillThrough False EndList 
Associations 227 
"Quantity" AssociationType 
Type_Query AssociationRole Role_Source 
AssociationReferenced "Quantity" 
 

CustomView 11529 "Authors"

DimensionView 149 "All Categories"

DimensionView 195 "Authors~User View"

MeasureInclude 225 Yes

CustomView indicates that a custom view has been defined.

"Authors" is the name of the custom view. Custom view names must be unique.

DimensionView 149 "All Categories" is a reference to a dimension ( 149 ) and the view that this custom view uses in that dimension, including all categories in the dimension.

The second dimension, DimensionView 195 "Authors~User View" , is the customized dimension view used for this custom view.

MeasureInclude 225 Yes indicates that measure 225 is included in the custom view. MeasureInclude values are Yes or No .

CustomView 11537 "Sub Authors" 
DimensionView 149 "All Categories" 
DimensionView 195 
"Sub Authors~User View" 

This entry creates a second custom view.


MeasureInclude 225 No

MeasureInclude 225 No indicates that measure 225 is excluded from this custom view.


CustomViewChildList 11529  
StartList 11537 EndList 
CustomViewChildList 11537 
StartList EndList 

CustomViewChildList 11529 StartList 11537 EndList defines the custom views that are descendents of the custom view "Authors".

References to custom views may be unique identifiers or names.


SecurityNameSpace 11533
 "Cognos" SecurityNameSpaceCAMID 
'CAMID(":")' 

SecurityNameSpace... defines the namespace from which security objects are retrieved. In this example, "Cognos" is the name of the namespace in Content Manager.


SecurityObject 11531 'CAMID(":Authors")' 
SecurityObjectDisplayName "Authors" 
SecurityObjectType SecurityType_Role

CustomViewList 11529 EndList

SecurityObject is the imported security object from the last defined namespace.

'CAMID(":Authors")' is the security control mechanism identifier for the security object from Content Manager.

SecurityType_Role indicates that the type of security object from Content Manager is a role. Possible values are SecurityType_Role, SecurityType_Group, and SecurityType_User.

CustomViewList 11529 EndList is a list of the custom views to which this security object is assigned.

References to custom views may be unique identifiers or names.

SecurityObject 11539 
'CAMID(":Analysis Users")' 
SecurityObjectDisplayName 
"Analysis Users" 
SecurityObjectType SecurityType_Role 
CustomViewList 11537 EndList 
 

SecurityNameSpace 
11563 "GOnamespace" 
SecurityNameSpaceCAMID 
'CAMID("GOnamespace")' 

SecurityNameSpace defines a second namespace from which security objects are retrieved.

When multiple namespaces are defined in a custom view, they are organized by namespace, followed by the security objects from that namespace.

SecurityObject 11561 'CAMID
("GOnamespace:r:authid=2589996611")' 
SecurityObjectDisplayName 
"Root User Class" SecurityObjectType 
SecurityType_Role CustomViewList 11537 
EndList
 
Cube 11535 "Cube1" EncryptedPW 
"DD32E203AA9AFC5C26233A515A4E83A1DD32
E203AA9AFC5C​26233A515A4E83A1DD32E20" 
"3AA9AFC5C2623A515A4E83A1DD32E203AA9A
FC5C26233A515​A4E83A1DD32E203AA9AFC" 
"5C26233A515A4E83A1DD32E203AA9AFC5C26
233A515A4E83A1​DD32E203AA9AFC5C26233" 
"A515A4E83A1DD32E203AA9AFC5C26233A515
A4E83A1DD32E20​3AA9AFC5C26233A515A4E" 
"83A1DD32E203AA9AFC5C26233A515A4E83A1
DD32E203AA9AFC5​C26233A515A4E83A1DD3" 
"2E203AA9AFC5C26233A515A4E83A1DD32E20
3AA9AFC5C26233​A515A4E83A1DD32E203AA" 
"9AFC5C26233A515A4E83A1DD32E203AA9AFC
5C26233A515A4E​83A1DD32E203AA9AFC5C2" 
"6233A515A4E83" 
Status New 
CubeCreation On 
Optimize Default  
ConsolidatedRecords 10000000 
PartitionSize 500000 
PassesNumber 5 
Compress False 
DatabaseInfo "Local;" 
IncrementalUpdate False 
ServerCube False 
CubeStamp 0
CubeCycle 0 
BlockParentTotals False 
Caching False 
UseAlternateFileName False 
DrillThrough False 
EndList DataSourceSignon False 
PublishEnable True 
PublishStatus None 
DimensionView 149  "All Categories" 
DimensionView 195 "All Categories"
MeasureInclude 225 Yes

This section creates the PowerCube.


PowerCubeCustomViewList
11537 EndList

Defines the custom views assigned to the PowerCube.

The list includes only the lowest custom views in the hierarchies. All ancestors are also considered to be assigned to the cube.

AllocationAdd Measure 225 Type Default 

After you add the required measures, you may want to specify how they will be allocated across the various dimensions in your model.