Processing Analysis Services Multidimensional Models

Microsoft Developer Network

On This Page

Introduction to Processing Analysis Services

Processing is a critical step in working with SQL Server Analysis Services (SSAS) multidimensional models. It involves loading data from data sources into the Analysis Services cube structure, making it available for querying and analysis. Proper processing ensures data accuracy, performance, and usability.

This document will guide you through the various methods, options, and best practices for processing your Analysis Services multidimensional models.

Diagram illustrating the SSAS processing flow

Understanding Processing Methods

Analysis Services offers several ways to process your data, each suited for different scenarios:

Full Process

A full process rebuilds the entire cube from scratch. This method is typically used when:

A full process involves processing all objects in the cube, including dimensions, measure groups, and partitions.

Incremental Process

An incremental process updates only the new or changed data since the last process. This is highly efficient for large datasets where only a subset of data changes frequently.

Key benefits of incremental processing:

Incremental processing can be applied at the partition level for measure groups.

Processing Partitions

Partitions allow you to divide large tables or cubes into smaller, manageable units. You can process individual partitions independently.

This is useful for:

Processing a partition involves processing its associated dimension and fact data.

Key Processing Options

When initiating a process, you have several options that affect how the data is handled and made available.

Online vs. Offline Processing

Online Processing: Allows users to continue querying the cube while it is being processed. This is achieved by Analysis Services maintaining two copies of the cube data during processing. Once processing is complete, the new data is swapped in. This minimizes disruption but can consume more memory and resources.

Offline Processing: The cube is taken offline and unavailable for querying during the entire processing operation. This method is simpler and can be faster in some cases as it doesn't require maintaining dual copies of data. It is suitable for scenarios where scheduled downtime is acceptable.

Processing Events

Analysis Services provides a rich set of events that are triggered during the processing lifecycle. These events can be used to:

Common events include BeforeProcess, AfterProcess, and events related to specific object processing like dimensions and measure groups.

Tip: For optimal performance, consider processing dimensions before processing fact tables or measure groups to ensure referential integrity.

Best Practices for Processing

Conclusion

Effective processing is fundamental to a well-performing and accurate Analysis Services solution. By understanding the different processing methods, utilizing appropriate options, and adhering to best practices, you can ensure your multidimensional models are always up-to-date and ready for insightful analysis.

For more advanced scenarios, explore scripting with AMO (Analysis Management Objects) or XMLA (XML for Analysis) to programmatically manage processing operations.

Example: Processing a Partition via XMLA (Conceptual)

Below is a simplified representation of an XMLA command to process a partition.

<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine" Transaction="true">
    <Alter Action="update" ObjectExpansion="ExpandObjectProperties" State="Visible">
        <Object >
            <DatabaseID>YourDatabaseName</DatabaseID>
            <CubeID>YourCubeName</CubeID>
            <MeasureGroupID>YourMeasureGroupName</MeasureGroupID>
            <PartitionID>YourPartitionID</PartitionID>
        </Object>
        <ObjectDefinition>
            <Partition>
                <Name>YourPartitionID</Name>
                <ProcessingState>Processed</ProcessingState>
            </Partition>
        </ObjectDefinition>
    </Alter>
    <Process xmlns="http://schemas.microsoft.com/analysisservices/2003/engine" State="Unprocessed">
        <Object >
            <DatabaseID>YourDatabaseName</DatabaseID>
            <CubeID>YourCubeName</CubeID>
            <MeasureGroupID>YourMeasureGroupName</MeasureGroupID>
            <PartitionID>YourPartitionID</PartitionID>
        </Object>
        <Type>ProcessFull</Type>
        <Online>true</Online>
    </Process>
</Batch>