Dimension Processing in SQL Server Analysis Services

Dimension processing is a critical step in SQL Server Analysis Services (SSAS) multidimensional modeling. It involves populating the dimension tables with data from your data source, making the dimension attributes available for querying within your cubes.

Note: Proper dimension processing ensures data integrity and query performance. Without processing, dimension data will not be available for analysis. }

Understanding Dimension Processing

When you process a dimension, SSAS reads the data from the underlying data source, transforms it according to the dimension's structure, and loads it into the Analysis Services database. This includes:

Processing Modes

Analysis Services offers several processing modes for dimensions, each with different implications for data freshness and performance:

Full Process

This mode deletes all existing data in the dimension and then repopulates it from the source. It's a complete refresh and is often used when the underlying source data has undergone significant structural changes or when a complete data reset is required.

-- Example of a full process command (conceptual)
        PROCESS Dimension [YourDimensionName] ON FULL;

Process Update

This mode updates existing dimension members and adds new members. It's more efficient than a full process if only incremental changes have occurred in the source data. It handles additions and modifications but typically does not remove members that have been deleted from the source.

-- Example of a process update command (conceptual)
        PROCESS Dimension [YourDimensionName] ON UPDATE;

Process Add

This mode adds new members to an existing dimension but does not update or delete existing members. It's the fastest processing mode and is suitable for scenarios where new dimension members are frequently added.

-- Example of a process add command (conceptual)
        PROCESS Dimension [YourDimensionName] ON ADD;

Process Default

This mode performs the most appropriate processing based on the current state of the dimension. If the dimension has never been processed, it performs a full process. If it has been processed, it typically performs an incremental update (similar to Process Update).

-- Example of a process default command (conceptual)
        PROCESS Dimension [YourDimensionName] ON DEFAULT;
Tip: For most daily or hourly updates, 'Process Update' or 'Process Add' are preferred for performance. 'Full Process' should be reserved for scenarios requiring a complete data reset.

Dimension Processing in SQL Server Management Studio (SSMS)

You can process dimensions directly through SQL Server Management Studio:

  1. Connect to your Analysis Services instance.
  2. Navigate to your database and then to the Dimensions folder.
  3. Right-click on the dimension you wish to process.
  4. Select "Process..." from the context menu.
  5. In the "Process Designer" dialog, choose the desired "Processing Option" (e.g., "Full data sync" for Full Process, "Incremental data sync" for Process Update).
  6. Click "OK" to initiate the processing.

Dimension Processing via XMLA

Dimension processing can also be automated using XML for Analysis (XMLA) commands. This is commonly used in deployment scripts and ETL processes.

Example XMLA for Full Process

<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine" Transaction="true">
          <Alter ObjectID="[YourDimensionName]">
            <ObjectDefinition>
              <Dimension xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2008/engine/adef" xmlns:ddl20="http://schemas.microsoft.com/analysisservices/2010/engine/adef" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2011/engine/adef" xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/adef" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
                <Name>YourDimensionName</Name>
                <Processed>false</Processed>
                <Processing>
                  <ProcessFull>true</ProcessFull>
                </Processing>
              </Dimension>
            </ObjectDefinition>
          </Alter>
        </Batch>
Important: Ensure that the underlying data source views used by your dimensions are accessible and contain the expected data before initiating processing.

Best Practices for Dimension Processing

By effectively managing dimension processing, you can ensure your multidimensional models are accurate, responsive, and ready for insightful business analysis.

Next: Processing Objects Previous: Designing Measures