Jaa


AMO OLAP Classes

New: 5 December 2005

Analysis Management Objects (AMO) OLAP classes help you create, modify, delete, and process cubes, dimensions, and related objects such as Key Performance Indicators (KPIs), actions, and proactive caching.

For more information about setting up the AMO programming environment, how to establish a connection with a server, accessing a database or defining data sources and data source views, see AMO Fundamental Classes.

This topic contains the following sections:

  • Dimension Objects
  • Cube Objects
  • MeasureGroup Objects
  • Partition Objects
  • AggregationDesign Objects
  • Aggregation Objects
  • Action Objects
  • KPI Objects
  • Perspective Objects
  • Translation Objects
  • ProactiveCaching Objects

The following illustration shows the relationship of the classes that are explained in this topic.

OLAP Classes in AMO

Basic Classes

Basic classes are the minimum set of objects that are required to build a cube. This minimum set of objects is a dimension, a measure group, and a partition. An aggregation is optional.

Dimensions are built from attributes and hierarchies. Hierarchies are formed by an ordered set of attributes, where each attribute of the set corresponds to a level in the hierarchy.

Cubes are built from dimensions and measure groups. The dimensions in the dimensions collection of a cube belong to the dimensions collection of the database. Measure groups are collections of measures that have the same data source view and have the same subset of dimensions from the cube. A measure group has one or more partitions to manage the physical data. A measure group can have a default aggregation design. The default aggregation design can be used by all partitions in the measure group; also, each partition can have its own aggregation design.

Dimension Objects

A simple Dimension object is composed of basic information, attributes, and hierarchies. Basic information includes the name of the dimension, the type of the dimension, the data source, the storage mode, and others. Attributes define the actual data in the dimension. Attributes do not necessarily belong to a hierarchy, but hierarchies are built from attributes. A hierarchy creates ordered lists of levels, and defines the ways a user can explore the dimension.

A dimension is created by adding it to the dimensions collection of the parent database, and by updating the Dimension object to the server by using the Update method.

To remove a dimension, it has to be dropped by using the Drop method of the Dimension. Removing a Dimension from the dimensions collection of the database by using the Remove method does not delete it on the server, just in the AMO object model.

A Dimension object can be processed after it has been created. The Dimension can be processed using its own process method, or it can be processed with the parent object's process method when the parent object is processed.

For more information about methods and properties available, see Microsoft.AnalysisServices.Dimension in the Microsoft.AnalysisServices namespace.

Cube Objects

A simple Cube object is composed of: basic information, dimensions, and measure groups. Basic information includes the name of the cube, the default measure of the cube, the data source, the storage mode, and others.

Dimensions are the actual set of dimensions used in the cube. All dimensions have to be defined in the dimensions collection of the database before being referenced in the cube. Private dimensions, which are available in Microsoft SQL Server 2000 Analysis Services, are not available in Microsoft SQL Server 2005 Analysis Services.

Measure groups are sets of measures in the cube. A measure group is a collection of measures that have a common data source view and a common set of dimensions. A measure group is the unit of process for measures; measure groups can be processed individually and then browsed.

A cube is created by adding it to the cubes collection of the database, then updating the Cube object to the server by using the Update method. The Update method of the cube can include the parameter UpdateOptions.ExpandFull, which ensures that all objects in the cube that were modified will be updated to the server in this update action.

To remove a cube, it has to be dropped by using the Drop method of the Cube. Removing a cube from the collection does not affect the server.

A Cube object can be processed after it has been created. The Cube can be processed using its own process method, or it can be processed when a parent object processes itself with its own Process method.

For more information about methods and properties available, see Microsoft.AnalysisServices.Cube in the Microsoft.AnalysisServices namespace.

MeasureGroup Objects

A simple MeasureGroup object is composed of: basic information, measures, dimensions, and partitions. Basic information includes the name of the measure group, the type of measures, the storage mode, the processing mode, and others. Measures are the actual set of measures that compose the measure group. For each measure there is a definition for the aggregate function, the formatting attribute, the data item source, and others. Dimensions are a subset of cube dimensions that will be used to create the processed measure group. Partitions are the collection of physical splits of the processed measure group.

A measure group is created by adding it to the measure group collection of the cube, then updating the MeasureGroup object to the server by using its own Update method. A MeasureGroup object is removed using its own Drop method.

A MeasureGroup object can be processed after it has been created. The MeasureGroup can be processed by using its own Process method, or it can be processed when a parent object processes itself with its own Process method.

For more information about methods and properties available, see Microsoft.AnalysisServices.MeasureGroup in the Microsoft.AnalysisServices namespace.

Partition Objects

A partition is a container for a portion of the measure group data. Partitions are not seen from MDX queries; all queries reflect the whole content of the measure group, regardless of how many partitions are defined for the measure group. The data content of a partition is defined by the query bindings of the partition, and by the slicing expression.

A simple Partition object is composed of: basic information, slicing definition, aggregation design, and others. Basic information includes the name of the partition, the storage mode, the processing mode, and others. The slicing definition is an MDX expression specifying a tuple or a set. The slicing definition has the same restrictions as the StrToSet MDX function. Together with the CONSTRAINED parameter, the slicing definition can use dimension, hierarchy, level and member names, keys, unique names, or other named objects in the cube, but cannot use MDX functions. The aggregation design is a collection of aggregation definitions that can be shared across multiple partitions. The default is taken from the parent cube's aggregation design.

A Partition object is created by adding it to the partitions collection of the parent measure group, then updating the Partition object on the server by using the Update method. A Partition object is removed by using the Drop method.

For more information about methods and properties available, see Microsoft.AnalysisServices.Partition in the Microsoft.AnalysisServices namespace.

AggregationDesign Objects

An AggregationDesign object defines a set of aggregation definitions that can be shared across multiple partitions.

Aggregation designs are constructed using the AggregationDesign method from an AggregationDesign object.

For more information about methods and properties available, see Microsoft.AnalysisServices.AggregationDesign in the Microsoft.AnalysisServices namespace.

Aggregation Objects

An Aggregation object represents the summarization of measure group data at certain granularity of the dimensions.

A simple Aggregation object is composed of: basic information and dimensions. Basic information includes the name of the aggregation, the ID, annotations, and a description. The dimensions are a collection of AggregationDimension objects that contain the list of granularity attributes for the dimension.

An Aggregation object is created by adding it to the aggregation designs collection of the parent measure group, then updating the parent measure group object on the server by using the Update method. An aggregation is removed from the AggregationCollection by using the Remove method or the RemoveAt method.

For more information about methods and properties available, see Microsoft.AnalysisServices.Aggregation in the Microsoft.AnalysisServices namespace.

Advanced Classes

Advanced classes provide OLAP functionality beyond building and browsing a cube. The following are some of the advanced classes and the benefits they provide:

  • Action classes are used to create an active response when browsing certain areas of the cube.
  • Key Performance Indicators (KPIs) enable comparison analysis between values of data.
  • Perspectives provide selected views of a single cube, so that users can focus on what is important to them.
  • Translations allow the cube to be customized to the user locale.
  • Proactive caching classes can provide a balance between the enhanced performance of MOLAP storage and the immediacy of ROLAP storage, and provide scheduled partition processing.

AMO is used to set the definitions for this enhanced behavior, but the actual experience is defined by the browsing client that implements all of these enhancements.

Action Objects

Actions can be of different types and they have to be created accordingly. Actions can be:

  • Drillthrough actions, which return the set of rows that represents the underlying data of the selected cells of the cube where the action occurs.
  • Reporting actions, which return a report from Reporting Services that is associated with the selected section of the cube where the action occurs.
  • Standard actions, which return the action element (URL, HTML, DataSet, RowSet, and other elements) that is associated with the selected section of the cube where the action occurs.

AMO is used to define the actions. A query interface, such as ADOMD.NET, is used by the client application to retrieve and expose the actions to the end user. For more information see ADOMD.NET.

A simple Action object is composed of: basic information, the target where the action is to occur, a condition to limit the action scope, and the type. Basic information includes the name of the action, the description of the action, the caption suggested for the action, and others.

The target is the actual location in the cube where the action is to occur. The target is composed of a target type and a target object. Target type represents the kind of object, in the cube, where the action is to be enabled. Target type could be level members, cells, hierarchy, hierarchy members, or others. The target object is a specific object of the target type; if the target type is hierarchy, then the target object is any one of the defined hierarchies in the cube.

The condition is a Boolean MDX expression that is evaluated at the action event. If the condition evaluates to true, then the action is executed. Otherwise, the action is not executed.

The type is the kind of action to be executed. Action is an abstract class, therefore, to use it you have to use any one of the derived classes. Two kinds of actions are predefined: drillthrough and reporting. These have corresponding derived classes: DrillThroughAction and ReportAction. Other actions are covered in the StandardAction class.

An Action object is created by adding it to the actions collection of the cube, then updating the Cube object to the server by using the Update method. The update method of the cube can include the parameter UpdateOptions.ExpandFull, which ensures that all objects in the cube that were modified will be updated to the server with this update action.

To remove an Action object, it must be removed from the collection and the parent cube must be updated.

A cube must be updated and processed before the action can be used from the client.

For more information about methods and properties available, see Microsoft.AnalysisServices.Action in the Microsoft.AnalysisServices namespace.

Kpi Objects

In business terminology, a Key Performance Indicator (KPI) is a quantifiable measurement for gauging business success.

In Analysis Services, a KPI is a collection of calculations that are associated with a measure group in a cube that are used to evaluate business success. Typically, these calculations are a combination of Multidimensional Expressions (MDX) expressions or calculated members. KPIs also have additional metadata that provides information about how client applications should display the results of the KPI's calculations.

A KPI handles information about a goal set, the actual formula of the performance recorded in the cube, and measurement to show the trend and the status of the performance. AMO is used to define the formulas and other definitions about the values of a KPI. A query interface, such as ADOMD.NET, is used by the client application to retrieve and expose the KPI values to the end user. For more information see ADOMD.NET.

A simple Kpi object is composed of: basic information, the goal, the actual value achieved, a status value, a trend value, and a folder where the KPI is viewed. Basic information includes the name and description of the KPI. The goal is an MDX expression that evaluates to a number. The actual value is an MDX expression that evaluates to a number. The status and trend value are MDX expressions that evaluate to a number. The folder is a suggested location for the KPI to be presented to the client.

A Kpi object is created by adding it to the KPI collection of the cube, then updating the Cube object to the server by using the Update method. The Update method of the cube can include the parameter UpdateOptions.ExpandFull, which ensures that all objects in the cube that were modified will be updated to the server with this update action.

To remove a Kpi object, it must be removed from the collection, then and the parent cube must be updated.

A cube must be updated and processed before the KPI can be used.

For more information about methods and properties available, see Microsoft.AnalysisServices.Kpi in the Microsoft.AnalysisServices namespace.

Perspective Objects

A perspective is a definition that allows users to see a cube in a simpler way. A perspective is a subset of the features of a cube. A perspective enables administrators to create views of a cube, helping users to focus on the most relevant data for them. A perspective contains subsets of all objects from a cube. A perspective cannot include elements that are not defined in the parent cube.

A simple Perspective object is composed of: basic information, dimensions, measure groups, calculations, KPIs, and actions. Basic information includes the name and the default measure of the perspective. The dimensions are a subset of the cube dimensions. The measure groups are a subset of the cube measure groups. The calculations are a subset of the cube calculations. The KPIs are a subset of the cube KPIs. The actions are a subset of the cube actions.

A Perspective object is created by adding it to the perspective collection of the cube, then updating the Cube object to the server by using the Update method. The Update method of the cube can include the parameter UpdateOptions.ExpandFull, which ensures that all objects in the cube that were modified will be updated to the server with this update action.

To remove a Perspective object, it must be removed from the collection, then the parent cube must be updated.

A cube has to be updated and processed before the perspective can be used.

For more information about methods and properties available, see Microsoft.AnalysisServices.Perspective in the Microsoft.AnalysisServices namespace.

Translation Objects

A translation is a simple mechanism to change the displayed labels and captions from one language to another. Each translation is defined as a pair of values: a string with the translated text, and a number with the language ID. Translations are available for all objects in Analysis Services. Dimensions can also have the attribute values translated. The client application is responsible for finding the language setting that the user has defined, and switch to display all captions and labels to that language. An object can have as many translations as you want.

A simple Translation object is composed of: language ID number, and translated caption. The language ID number is an Integer with the language ID. The translated caption is the translated text.

A Translation object is created by adding it to the translation collection of the desired object, then updating the closest major parent object to the server by using the Update method. The Update method of the closest parent object can include the parameter UpdateOptions.ExpandFull, which ensures that all children objects that were modified will be updated to the server with this update action.

To remove a Translation object, it must be removed from the collection, then the closest parent object must be updated.

For more information about methods and properties available, see Microsoft.AnalysisServices.Translation in the Microsoft.AnalysisServices namespace.

ProactiveCaching Objects

Proactive caching provides automatic MOLAP cache creation and management for OLAP objects. The cubes immediately incorporate changes that are made to the data in the database, based upon notifications received from the database. The goal of proactive caching is to provide the performance of traditional MOLAP, while retaining the immediacy and ease of management offered by ROLAP.

A simple ProactiveCaching object is composed of: timing specification, and table notification. The timing specification defines the timeframe for updating the cache after a change notification has been received. The table notification defines the notification schema between the data table and the ProactiveCaching object.

A ProactiveCaching object is created by adding it to the proactive caching object collection of the dimension or partition, then updating the dimension or partition object to the server by using the Update method.

To remove a ProactiveCaching object, it must be removed from the collection, then the parent object must be updated.

A dimension or partition must be updated and processed before proactive caching is enabled and ready to be used.

For more information about methods and properties available, see Microsoft.AnalysisServices.ProactiveCaching in the Microsoft.AnalysisServices namespace.

See Also

Reference

Microsoft.AnalysisServices

Concepts

Introducing AMO Classes
Programming AMO OLAP Basic Objects
Programming AMO OLAP Advanced Objects

Other Resources

Analysis Services Concepts and Objects
Analysis Services Objects

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

14 April 2006

New content:
  • Added an illustration to show the relationship of objects described in this topic.