Share via


Objects and Object Characteristics

Objects in Analysis Services Scripting Language (ASSL) follow specific guidelines in regards to object groups, inheritance, naming, expansion, and processing.

Object Groups

All Microsoft SQL Server 2005 Analysis Services (SSAS) objects have an XML representation. The objects are divided into two groups:

  • Major objects
    Major objects can be independently created, altered, and deleted. Major objects include:

    • Servers
    • Databases
    • Dimensions
    • Cubes
    • Measure groups
    • Partitions
    • Perspectives
    • Mining models
    • Roles
    • Commands associated with a server or database
    • Data sources

    Major objects have the following properties to track their history and status.

    • CreatedTimestamp
    • LastSchemaUpdate
    • LastProcessed (where appropriate)

    Note

    The classification of an object as a major object affects how an instance of Analysis Services treats that object and how that object is handled in the object definition language. However, this classification does not guarantee that Analysis Services management and development tools will allow the independent creation, modification, or deletion of these objects.

  • Minor objects
    Minor objects can only be created, altered, or deleted as part of creating, altering, or deleting the parent major object. Minor objects include:

    • Hierarchies and levels
    • Attributes
    • Measures
    • Mining model columns
    • Commands associated with a cube
    • Aggregations

Object Inheritance

The ASSL object model contains many repeated element groups. For example, the element group, “Dimensions contain Hierarchies,” defines the dimension hierarchy of an element. Both Cubes and MeasureGroups contain the element group, "Dimensions contain Hierarchies."

Unless explicitly overridden, an element inherits the details of these repeated element groups from the higher level. For example, the Translations for a CubeDimension are the same as the Translations for its ancestor element, Cube.

To explicitly override properties inherited from a higher-level object, an object does not need to repeat explicitly the entire structure and properties of the higher-level object. The only properties that an object needs to state explicitly are those properties that the object wants to override. For example, a CubeDimension may list only those Hierarchies that need to be disabled in the Cube, or for which the visibility needs to be changed, or for which some Level details have not been provided at the Dimension level.

Some properties specified on an object provide default values for the same property on a child or descendant object. For example, Cube.StorageMode provides the default value for Partition.StorageMode. For inherited default values, ASSL applies the same rules as used in Decision Support Objects (DSO) 8.0. The following list describes these rules for inherited default values:

  • When the property for the child object is null in the XML, the property's value defaults to the inherited value. However, if you query the value from the server, the server returns the null value of the XML element.
  • It is not possible to determine programmatically whether the property of a child object has been set directly on the child object or inherited.

Object Names, IDs, and References

In general, every major object contains the following properties:

  • Name   Normally, the names of sibling objects are unique within the scope of the parent collection. For example, two different Database objects may have the same Dimension names. However, within each Database, the Dimension names are unique. Exceptions to this rule are noted later. For example, Measure names need to be unique at the Cube level, but they do not need to be unique at the level of the parent MeasureGroup.
  • ID   The uniqueness restrictions that apply to Name properties also apply to ID properties. In addition, ID properties cannot be changed. ID properties are assigned upon creation by the user, by the application, or automatically by the server (if the properties are not specified). If the server assigns ID properties, the server sets the ID properties to the initial name of the object.
  • Description

Object References

Objects are referenced by their ID properties. The naming convention for ID properties starts with a name that is based on the target type, adds the suffix "ID", and possibly adds a prefix that provides extra information on the role that the object plays. For example, the object is the default measure used in a Cube. The target type of the object is Measure. To this target type name, you add the suffix "ID" and the prefix "Default." The resulting ID property name becomes DefaultMeasureID, as shown in the following code:

<Cube>

<DefaultMeasureID>Amount</DefaultMeasureID>

<Cube>

 

When a qualified name that consists of multiple IDs is required (for example, CubeID and MeasureID both refer to a measure in another Cube), then an outer element is introduced to contain the set of ID elements.

Reference Exceptions

A DataSource reference that consists of a single dot (.) refers to the current database of the current OLAP server. For example, the following XML fragment points to the current Database of the current OLAP server instance:

<DataSourceID>.</DataSourceID>

 

References to DataSourceView (DSV) elements are exceptions to the referencing rules. A DataSet object in the Microsoft .NET Framework describes the schema for a DSV. In the schema, a DSV object has a Name, but not an immutable ID. Therefore, references to a DSV object needs to use the Name as the identification mechanism. For example, the reference, ColumnBinding.TableID, does not contain the ID. Instead, the reference contains the Name of the appropriate table.

Naming Guidelines

ASSL applies the same rules for case and whitespace to Names and ID properties as use in DSO 8.0:

  • The uniqueness check for Name and ID is not case sensitive. Therefore, it is not possible to have a Cube named “sales” and another named “Sales” in the same database.
  • While a Name or ID property can contain embedded spaces, the property cannot contain leading or trailing spaces. Leading and trailing spaces are implicitly trimmed. This rule applies both to the Name and ID of an object, as well as to the values of elements that reference that Name and ID.

The following rules also apply to Name and ID properties. These rules are similar to rules in DSO 8.0.

  • The maximum number of characters is 100.
  • There is no special requirement for the first character of an identifier. The first character may be any valid character

The following reserved names must not be used:

  • AUX
  • CLOCK$
  • COM1 through COM9 (COM1, COM2, COM3, and so on)
  • CON
  • LPT1 through LPT9 (LPT1, LPT2, LPT3, and so on)
  • NUL
  • PRN
  • NULL is not allowed as a character in any string within the XML

The following table lists invalid characters for specific objects.

Object Invalid characters

Server

The name must follow the rules for computer names. (IP addresses are not valid.)

DataSource

: / \ * | ? " () [] {} <>

Level or Attribute

. , ; ' ` : / \ * | ? " & % $ ! + = [] {} < >

Dimension or Hierarchy

.,, ; ' ` : / \ * | ? " & % $ ! + = () [] {} <,>

All other objects

. , ; ' ` : / \ * | ? " & % $ ! + = () [] {} < >

Localized Names

Captions for objects that are visible to clients (for example, Dimension, Hierarchy, and Level) can be localized into different languages. Captions for objects that are defined by way of commands (for example, calculated measures and named sets) are provided as part of the MDX definition of the objects.

The bindings for attributes also allow a different source (for example, a different source column) for the attribute name to be provided for different languages.

It is not possible to localize the Names of objects.

Object Expansion

The ObjectExpansion restriction can be used to control the degree of expansion of ASSL XML returned by the server. This restriction has the options listed in the following table.

Enumeration value Allowed for <Alter> Description

ReferenceOnly

no

Returns only the name, ID, and timestamp for the requested object and for all contained major objects recursively.

ObjectProperties

yes

Expands the requested object and minor contained objects, but does not return major contained objects.

ExpandObject

no

Same as ObjectProperties, but also returns the name, ID, and timestamp for contained major objects.

ExpandFull

yes

Fully expands the requested object and all contained objects recursively.

This ASSL reference section describes the ExpandFull representation. All other ObjectExpansion levels are derived from this level.

Object Processing

ASSL includes read-only elements or properties (for example, LastProcessed) that can be read from the Analysis Services instance, but which are omitted when command scripts are submitted to the instance. Analysis Services ignores modified values for read-only elements without warning or error.

Analysis Services also ignores inappropriate or irrelevant properties without raising validation errors. For example, the X element should only be present when the Y element has a particular value. The Analysis Services instance ignores the X element instead of validating that element against the value of the Y element.

See Also

Concepts

Introducing Analysis Services Scripting Language

Help and Information

Getting SQL Server 2005 Assistance