DTD Name:mondrian.dtd
Class Name:MondrianDef
Root Element:Schema
Version:1.0
Overview |
This is the XML model for Mondrian schemas. Revision is $Id: //open/mondrian-release/3.0/src/main/mondrian/olap/Mondrian.xml#3 $
ElementSchema |
A schema is a collection of cubes and virtual cubes. It can also contain shared dimensions (for use by those cubes), named sets, roles, and declarations of user-defined functions.
Attribute Type Default Description name String none Name of this schema measuresCaption String none Label for the measures dimension. Can be localized from Properties file using #{propertyname}. defaultRole String none The name of the default role for connections to this schema
Element Java Name Constraints Description Parameter parameters Array This schema's parameter definitions. Dimension dimensions Array Shared dimensions in this schema. Cube cubes Array Cubes in this schema. VirtualCube virtualCubes Array Virtual cubes in this schema. NamedSet namedSets Array Named sets in this schema. Role roles Array Roles in this schema. UserDefinedFunction userDefinedFunctions Array Declarations of user-defined functions in this schema.
ElementCube |
Definition of a cube.
Attribute Type Default Description name String none Name of this cube. caption String none A string being displayed instead of the cube's name. Can be localized from Properties file using #{propertyname}. defaultMeasure String none The name of the measure that would be taken as the default measure of the cube. cache Boolean true Should the Fact table data for this Cube be cached by Mondrian or not. The default action is to cache the data. enabled Boolean true Whether element is enabled - if true, then the Cube is realized otherwise it is ignored.
Element Java Name Constraints Description Relation fact Required The fact table is the source of all measures in this cube. If this is a Table
and the schema name is not present, table name is left unqualified.CubeDimension dimensions Array Measure measures Array CalculatedMember calculatedMembers Array Calculated members in this cube. NamedSet namedSets Array Named sets in this cube.
ElementVirtualCube |
A VirtualCube
is a set of dimensions and measures gleaned from other cubes.
Attribute Type Default Description enabled Boolean true Whether this element is enabled - if true, then the Virtual Cube is realized otherwise it is ignored. name String none defaultMeasure String none The name of the measure that would be taken as the default measure of the cube. caption String none A string being displayed instead of the cube's name. Can be localized from Properties file using #{propertyname}.
Element Java Name Constraints Description CubeUsages cubeUsage Optional VirtualCubeDimension dimensions Array VirtualCubeMeasure measures Array CalculatedMember calculatedMembers Array Calculated members that belong to this virtual cube. (Calculated members inherited from other cubes should not be in this list.) NamedSet namedSets Array Named sets in this cube.
ElementCubeUsages |
List of base cubes used by the virtual cube.
none
Element Java Name Constraints Description CubeUsage cubeUsages Array [1 .. ]
ElementCubeUsage |
Attribute Type Default Description cubeName String none Name of the cube which the virtualCube uses. ignoreUnrelatedDimensions Boolean false Unrelated dimensions to measures in this cube will be pushed to top level member.
empty
ElementVirtualCubeDimension |
A VirtualCubeDimension is a usage of a Dimension in a VirtualCube.
CubeDimension
Attribute Type Default Description cubeName String none Name of the cube which the dimension belongs to, or unspecified if the dimension is shared. name String none Name of the dimension.
empty
ElementVirtualCubeMeasure |
A VirtualCubeMeasure is a usage of a Measure in a VirtualCube.
Attribute Type Default Description cubeName String none Name of the cube which the measure belongs to. name String none Unique name of the measure within its cube. visible Boolean none Whether this member is visible in the user-interface. Default true.
empty
ElementDimensionUsage |
A DimensionUsage
is usage of a shared Dimension within the context of a cube.
CubeDimension
Attribute Type Default Description source String none Name of the source dimension. Must be a dimension in this schema. Case-sensitive. level String none Name of the level to join to. If not specified, joins to the lowest level of the dimension. usagePrefix String none If present, then this is prepended to the Dimension column names during the building of collapse dimension aggregates allowing 1) different dimension usages to be disambiguated during aggregate table recognition and 2) multiple shared dimensions that have common column names to be disambiguated.
empty
ElementDimension |
A Dimension
is a collection of hierarchies. There are two kinds: a public dimension belongs to aSchema
, and be used by several cubes; a private dimension belongs to aCube
. TheforeignKey
field is only applicable to private dimensions.
CubeDimension
Attribute Type Default Description name String none type String none The dimension's type may be one of "Standard" or "Time". A time dimension will allow the use of the MDX time functions (WTD, YTD, QTD, etc.). Use a standard dimension if the dimension is not a time-related dimension. The default value is "Standard"
.caption String none A string being displayed instead of the dimensions's name. Can be localized from Properties file using #{propertyname}. usagePrefix String none If present, then this is prepended to the Dimension column names during the building of collapse dimension aggregates allowing 1) different dimensions to be disambiguated during aggregate table recognition. This should only be set for private dimensions.
Element Java Name Constraints Description Hierarchy hierarchies Array
ElementHierarchy |
Defines a hierarchy. You must specify at most one <Relation>
ormemberReaderClass
. If you specify none, the hierarchy is assumed to come from the same fact table of the current cube.
Attribute Type Default Description name String none Name of the hierarchy. If this is not specified, the hierarchy has the same name as its dimension. hasAll Boolean none Whether this hierarchy has an 'all' member. allMemberName String none Name of the 'all' member. If this attribute is not specified, the all member is named 'All hierarchyName', for example, 'All Store'. allMemberCaption String none A string being displayed instead as the all member's name. Can be localized from Properties file using #{propertyname}. allLevelName String none Name of the 'all' level. If this attribute is not specified, the all member is named '(All)'. Can be localized from Properties file using #{propertyname}. primaryKey String none The name of the column which identifies members, and which is referenced by rows in the fact table. If not specified, the key of the lowest level is used. See also CubeDimension.foreignKey
.primaryKeyTable String none The name of the table which contains primaryKey
. If the hierarchy has only one table, defaults to that; it is required.defaultMember String none memberReaderClass String none Name of the custom member reader class. Must implement the mondrian.rolap.MemberReader interface. caption String none A string to be displayed in the user interface. If not specified, the hierarchy's name is used. Can be localized from Properties file using #{propertyname}.
Element Java Name Constraints Description RelationOrJoin relation Optional The {@link MondrianDef.Table table}, {@link MondrianDef.Join set of tables}, {@link MondrianDef.View SQL statement}, or {@link MondrianDef.InlineTable inline table} which populates this hierarchy. Level levels Array MemberReaderParameter memberReaderParameters Array none
ElementLevel |
Attribute Type Default Description approxRowCount String none The estimated number of members in this level. Setting this property improves the performance of MDSCHEMA_LEVELS, MDSCHEMA_HIERARCHIES and MDSCHEMA_DIMENSIONS XMLA requests name String none table String none The name of the table that the column comes from. If this hierarchy is based upon just one table, defaults to the name of that table; otherwise, it is required. Can be localized from Properties file using #{propertyname}. column String none The name of the column which holds the unique identifier of this level. nameColumn String none The name of the column which holds the user identifier of this level. ordinalColumn String none The name of the column which holds member ordinals. If this column is not specified, the key column is used for ordering. parentColumn String none The name of the column which references the parent member in a parent-child hierarchy. nullParentValue String none Value which identifies null parents in a parent-child hierarchy. Typical values are 'NULL' and '0'. type String String Indicates the type of this level's key column: String, Numeric, Integer, Boolean, Date, Time or Timestamp. When generating SQL statements, Mondrian encloses values for String columns in quotation marks, but leaves values for Integer and Numeric columns un-quoted. Date, Time, and Timestamp values are quoted according to the SQL dialect. For a SQL-compliant dialect, the values appear prefixed by their typename, for example, "DATE '2006-06-01'". uniqueMembers Boolean false Whether members are unique across all parents. For example, zipcodes are unique across all states. The first level's members are always unique. levelType String Regular Whether this is a regular or a time-related level. The value makes a difference to time-related functions such as YTD (year-to-date). hideMemberIf String Never Condition which determines whether a member of this level is hidden. If a hierarchy has one or more levels with hidden members, then it is possible that not all leaf members are the same distance from the root, and it is termed a ragged hierarchy. Allowable values are:
Never
(a member always appears; the default);IfBlankName
(a member doesn't appear if its name is null or empty); andIfParentsName
(a member appears unless its name matches the parent's.formatter String none Name of a formatter class for the member labels being displayed. The class must implement the mondrian.olap.MemberFormatter interface. caption String none A string being displayed instead of the level's name. Can be localized from Properties file using #{propertyname}. captionColumn String none The name of the column which holds the caption for members.
Element Java Name Constraints Description KeyExpression keyExp Optional The SQL expression used to populate this level's key. NameExpression nameExp Optional The SQL expression used to populate this level's name. If not specified, the level's key is used. OrdinalExpression ordinalExp Optional The SQL expression used to populate this level's ordinal. ParentExpression parentExp Optional The SQL expression used to join to the parent member in a parent-child hierarchy. Closure closure Optional none Property properties Array [0 .. ] none
ElementClosure |
Specifies the transitive closure of a parent-child hierarchy. Optional, but recommended for better performance. The closure is provided as a set of (parent/child) pairs: since it is the transitive closure these are actually (ancestor/descendant) pairs.
Attribute Type Default Description parentColumn String none none childColumn String none none
Element Java Name Constraints Description Table table Required none
ElementProperty |
Member property.
Attribute Type Default Description name String none column String none type String String Data type of this property: String, Numeric, Integer, Boolean, Date, Time or Timestamp. formatter String none Name of a formatter class for the appropriate property value being displayed. The class must implement the mondrian.olap.PropertyFormatter interface. caption String none A string being displayed instead of the name. Can be localized from Properties file using #{propertyname}.
empty
ElementMeasure |
Attribute Type Default Description name String none Name of this measure. column String none Column which is source of this measure's values. If not specified, a measure expression must be specified. datatype String none The datatype of this measure: String, Numeric, Integer, Boolean, Date, Time or Timestamp. The default datatype of a measure is 'Integer' if the measure's aggregator is 'Count', otherwise it is 'Numeric'. formatString String none Format string with which to format cells of this measure. For more details, see the mondrian.util.Format class. aggregator String none Aggregation function. Allowed values are "sum", "count", "min", "max", "avg", and "distinct-count". ("distinct count" is allowed for backwards compatibility, but is deprecated because XML enumerated attributes in a DTD cannot legally contain spaces.) formatter String none Name of a formatter class for the appropriate cell being displayed. The class must implement the mondrian.olap.CellFormatter interface. caption String none A string being displayed instead of the name. Can be localized from Properties file using #{propertyname}. visible Boolean none Whether this member is visible in the user-interface. Default true.
Element Java Name Constraints Description MeasureExpression measureExp Optional The SQL expression used to calculate a measure. Must be specified if a source column is not specified. CalculatedMemberProperty memberProperties Array [0 .. ] none
ElementCalculatedMember |
Attribute Type Default Description name String none Name of this calculated member. formatString String none Format string with which to format cells of this member. For more details, see {@link mondrian.util.Format}. caption String none A string being displayed instead of the name. Can be localized from Properties file using #{propertyname}. formula String none MDX expression which gives the value of this member. Equivalent to the Formula sub-element. dimension String none Name of the dimension which this member belongs to. visible Boolean none Whether this member is visible in the user-interface. Default true.
Element Java Name Constraints Description Formula formulaElement Optional MDX expression which gives the value of this member. CalculatedMemberProperty memberProperties Array [0 .. ] none
ElementCalculatedMemberProperty |
Property of a calculated member defined against a cube. It must have either an expression or a value.
Attribute Type Default Description name String none Name of this member property. caption String none A string being displayed instead of the Properties's name. Can be localized from Properties file using #{propertyname}. expression String none MDX expression which defines the value of this property. If the expression is a constant string, you could enclose it in quotes, or just specify the 'value' attribute instead. value String none Value of this property. If the value is not constant, specify the 'expression' attribute instead.
empty
ElementNamedSet |
<p>Defines a named set which can be used in queries in the same way as a set defined using a WITH SET clause.</p> <p>A named set can be defined against a particular cube, or can be global to a schema. If it is defined against a cube, it is only available to queries which use that cube.</p> <p>A named set defined against a cube is not inherited by a virtual cubes defined against that cube. (But you can define a named set against a virtual cube.)</p> <p>A named set defined against a schema is available in all cubes and virtual cubes in that schema. However, it is only valid if the cube contains dimensions with the names required to make the formula valid.</p>
Attribute Type Default Description name String none Name of this named set. formula String none MDX expression which gives the value of this set. Equivalent to the Formula sub-element.
Element Java Name Constraints Description Formula formulaElement Optional MDX expression which gives the value of this set.
ElementFormula |
none
Text
ElementMemberReaderParameter |
Not used
Attribute Type Default Description name String none none value String none none
empty
ElementView |
A collection of SQL statements, one per dialect.
Relation
Attribute Type Default Description alias String none none
Element Java Name Constraints Description SQL selects Array [1 .. ] none
ElementSQL |
Attribute Type Default Description dialect String generic Dialect of SQL the view is intended for.
Text
ElementJoin |
RelationOrJoin
Attribute Type Default Description leftAlias String none Defaults to left's alias if left is a table, otherwise required. leftKey String none none rightAlias String none Defaults to right's alias if right is a table, otherwise required. rightKey String none none
Element Java Name Constraints Description RelationOrJoin left Required none RelationOrJoin right Required none
ElementTable |
Relation
Attribute Type Default Description name String none none schema String none Optional qualifier for table
.alias String none Alias to be used with this table when it is used to form queries. If not specified, defaults to the table name, but in any case, must be unique within the schema. (You can use the same table in different hierarchies, but it must have different aliases.)
Element Java Name Constraints Description SQL filter Optional The SQL WHERE clause expression to be appended to any select statement AggExclude aggExcludes Array none AggTable aggTables Array none
ElementInlineTable |
Relation
Attribute Type Default Description alias String none Alias to be used with this table when it is used to form queries. If not specified, defaults to the table name, but in any case, must be unique within the schema. (You can use the same table in different hierarchies, but it must have different aliases.)
Element Java Name Constraints Description ColumnDefs columnDefs Required none Rows rows Required none
ElementColumnDefs |
Holder for an array of ColumnDef elements
none
Element Java Name Constraints Description ColumnDef array Array none
ElementColumnDef |
Column definition for an inline table.
Attribute Type Default Description name String none Name of the column. type String none Type of the column: String, Numeric, Integer, Boolean, Date, Time or Timestamp.
empty
ElementRows |
Holder for an array of Row elements
none
Element Java Name Constraints Description Row array Array none
ElementRow |
Row definition for an inline table. Must have one Column for each ColumnDef in the InlineTable.
none
Element Java Name Constraints Description Value values Array none
ElementValue |
Column value for an inline table. The CDATA holds the value of the column.
Attribute Type Default Description column String none Name of the column.
Text
ElementAggName |
AggTable
Attribute Type Default Description name String none The Table name of a Specific aggregate table.
empty
ElementAggPattern |
AggTable
Attribute Type Default Description pattern String none A Table pattern used to define a set of aggregate tables.
Element Java Name Constraints Description AggExclude excludes Array none
ElementAggExclude |
Attribute Type Default Description pattern String none A Table pattern not to be matched. name String none The Table name not to be matched. ignorecase Boolean true Whether or not the match should ignore case.
empty
ElementAggFactCount |
AggColumnName
none
empty
ElementAggIgnoreColumn |
AggColumnName
none
empty
ElementAggForeignKey |
The name of the column mapping from base fact table foreign key to aggregate table foreign key.
Attribute Type Default Description factColumn String none The name of the base fact table foreign key. aggColumn String none The name of the aggregate table foreign key.
empty
ElementAggLevel |
Attribute Type Default Description column String none The name of the column mapping to the level name. name String none The name of the Dimension Hierarchy level.
empty
ElementAggMeasure |
Attribute Type Default Description column String none The name of the column mapping to the measure name. name String none The name of the Cube measure.
empty
ElementColumn |
Expression
Attribute Type Default Description table String none Alias of the table which contains this column. Not required if the query only has one table. name String none Name of the column.
empty
ElementKeyExpression |
ExpressionView
none
empty
ElementParentExpression |
ExpressionView
none
empty
ElementOrdinalExpression |
ExpressionView
none
empty
ElementNameExpression |
ExpressionView
none
empty
ElementCaptionExpression |
ExpressionView
none
empty
ElementMeasureExpression |
ExpressionView
none
empty
ElementRole |
A role defines an access-control profile. It has a series of grants (or denials) for schema elements.
Attribute Type Default Description name String none none
Element Java Name Constraints Description SchemaGrant schemaGrants Array none Union union Optional none
ElementSchemaGrant |
Grants (or denies) this role access to this schema. access
may be "all", "all_dimensions", or "none". Ifaccess
is "all_dimensions", the role has access to all dimensions but still needs explicit access to cubes. See mondrian.olap.Role#grant(mondrian.olap.Schema,int).
Grant
none
Element Java Name Constraints Description CubeGrant cubeGrants Array none
ElementCubeGrant |
Grants (or denies) this role access to a cube. access
may be "all" or "none". See mondrian.olap.Role#grant(mondrian.olap.Cube,int).
Grant
Attribute Type Default Description cube String none The unique name of the cube
Element Java Name Constraints Description DimensionGrant dimensionGrants Array none HierarchyGrant hierarchyGrants Array none
ElementDimensionGrant |
Grants (or denies) this role access to a dimension. access
may be "all" or "none". Note that a role is implicitly given access to a dimension when it is given acess to a cube. See also the "all_dimensions" option of the "SchemaGrant" element. See mondrian.olap.Role#grant(mondrian.olap.Dimension,int).
Grant
Attribute Type Default Description dimension String none The unique name of the dimension
empty
ElementHierarchyGrant |
Grants (or denies) this role access to a hierarchy. access
may be "all", "custom" or "none". Ifaccess
is "custom", you may also specify the attributestopLevel
,bottomLevel
, and the member grants. See mondrian.olap.Role#grant(mondrian.olap.Hierarchy, int, mondrian.olap.Level).
Grant
Attribute Type Default Description hierarchy String none The unique name of the hierarchy topLevel String none Unique name of the highest level of the hierarchy from which this role is allowed to see members. May only be specified if the HierarchyGrant.access
is "custom". If not specified, role can see members up to the top level.bottomLevel String none Unique name of the lowest level of the hierarchy from which this role is allowed to see members. May only be specified if the HierarchyGrant.access
is "custom". If not specified, role can see members down to the leaf level.rollupPolicy String none Policy which determines how cell values are calculated if not all of the children of the current cell are visible to the current role. Allowable values are 'full' (the default), 'partial', and 'hidden'.
Element Java Name Constraints Description MemberGrant memberGrants Array none
ElementMemberGrant |
Grants (or denies) this role access to a member. The children of this member inherit that access. You can implicitly see a member if you can see any of its children. See mondrian.olap.Role#grant(mondrian.olap.Member,int).
Attribute Type Default Description member String none The unique name of the member access String none none
empty
ElementUnion |
Body of a Role definition which defines a Role to be the union of several Roles. The RoleUsage elements must refer to Roles that have been declared earlier in this schema file.
none
Element Java Name Constraints Description RoleUsage roleUsages Required none
ElementRoleUsage |
Usage of a Role in a union Role.
Attribute Type Default Description roleName String none none
empty
ElementUserDefinedFunction |
A UserDefinedFunction
is a function which extends the MDX language. It must be implemented by a Java class which implements the interface mondrian.spi.UserDefinedFunction.
Attribute Type Default Description name String none Name with which the user-defined function will be referenced in MDX expressions. className String none Name of the class which implemenets this user-defined function. Must implement the mondrian.spi.UserDefinedFunction
interface.
empty
ElementParameter |
A Parameter
defines a schema parameter. It can be referenced from an MDX statement using theParamRef
function and, if not final, its value can be overridden.
Attribute Type Default Description name String none Name of this parameter. description String none Description of this parameter. type String String Indicates the type of this parameter: String, Numeric, Integer, Boolean, Date, Time, Timestamp, or Member. modifiable Boolean true If false, statement cannot change the value of this parameter; the parameter becomes effectively constant (provided that its default value expression always returns the same value). Default is true. defaultValue String none Expression for the default value of this parameter.
empty
ClassCubeDimension |
A CubeDimension is either a usage of a Dimension ('shared dimension', in MSOLAP parlance), or a 'private dimension'.
Attribute Type Default Description name String none none caption String none A string being displayed instead of the Dimension's name. Can be localized from Properties file using #{propertyname}. foreignKey String none The name of the column in the fact table which joins to the leaf level of this dimension. Required in a private Dimension or a DimensionUsage, but not in a public Dimension.
empty
ClassRelationOrJoin |
A table or a join
none
empty
ClassRelation |
A table, inline table or view
RelationOrJoin
none
empty
ClassAggTable |
A definition of an aggregate table for a base fact table. This aggregate table must be in the same schema as the base fact table.
Attribute Type Default Description ignorecase Boolean true Whether or not the match should ignore case.
Element Java Name Constraints Description AggFactCount factcount Required What does the fact_count column look like. AggIgnoreColumn ignoreColumns Array none AggForeignKey foreignKeys Array none AggMeasure measures Array none AggLevel levels Array none
ClassAggColumnName |
Attribute Type Default Description column String none The name of the fact count column.
empty
ClassExpression |
none
empty
ClassExpressionView |
A collection of SQL expressions, one per dialect.
Expression
none
Element Java Name Constraints Description SQL expressions Array [1 .. ] none
ClassGrant |
Attribute Type Default Description access String none Values correspond to Access
.
empty