Azure Analysis Services Documentation

Process data to update models

Process Data in Azure Analysis Services

After creating or modifying your Azure Analysis Services (AAS) tabular or multidimensional model, you need to populate it with data. This process is called "processing." Processing updates the data in the model by querying the underlying data sources and loading the results into the model's in-memory cache. You can process entire models, individual tables, or partitions.

Why Process Data?

Processing Methods

You can process data using several methods:

Processing Types

There are different types of processing that determine how data is updated:

Processing an Entire Model

This section describes how to perform a full process on your entire model using SSMS.

Using SQL Server Management Studio (SSMS)
  1. Connect to your Azure Analysis Services server in SSMS.
  2. In the Object Explorer, expand the server node.
  3. Expand the Databases folder, and then expand your Analysis Services database.
  4. Right-click on the database name.
  5. Select Process.
  6. In the Process Database dialog box, under Objects to Process, select the objects you want to process. For a full model process, select the entire model.
  7. Under Processing Option, choose the desired processing type (e.g., Full Process).
  8. Click OK.

The processing status will be displayed in the Process Progress window.

Processing Individual Tables or Partitions

Processing individual tables or partitions is often more efficient, especially for large models.

Processing a Table in SSMS
  1. Follow steps 1-3 from the "Processing an Entire Model" section.
  2. Expand the Tables folder.
  3. Right-click on the table you want to process.
  4. Select Process.
  5. In the Process Table dialog box, choose the Processing Option (e.g., Full Process, Data Process).
  6. Click OK.
Processing a Partition in SSMS
  1. Follow steps 1-4 from the "Processing a Table" section.
  2. Expand the table, and then expand the Partitions folder.
  3. Right-click on the partition you want to process.
  4. Select Process.
  5. In the Process Partition dialog box, choose the Processing Option.
  6. Click OK.

Automating Processing with AMO/TOM

For scheduled or automated processing, you can use AMO (Analysis Services Management Objects) or TOM (Tabular Object Model). Here's a simplified C# example using TOM:


using Microsoft.AnalysisServices.Tabular;
using System;

// ...

// Connect to the Azure Analysis Services server
string serverName = "your_aas_server.asazure.windows.net";
string databaseName = "your_database_name";
string connectionString = $"Provider=MSOLAP;Data Source={serverName};Initial Catalog={databaseName};Impersonation Level=Impersonate;";

using (var server = new Server())
{
    server.ConnectionString = connectionString;
    server.Connect();

    var database = server.Databases.GetByName(databaseName);

    // Process the entire database
    Console.WriteLine($"Processing database: {database.Name}");
    var processingResult = database.Process(ProcessType.Full); // Or ProcessType.Data, ProcessType.Add

    if (processingResult.Status == Microsoft.AnalysisServices.OperationStatus.Completed)
    {
        Console.WriteLine("Database processed successfully!");
    }
    else
    {
        Console.WriteLine($"Database processing failed. Status: {processingResult.Status}, Error: {processingResult.ErrorDescription}");
    }

    // Or process a specific table
    // var table = database.Tables.GetByName("YourTableName");
    // Console.WriteLine($"Processing table: {table.Name}");
    // var tableProcessingResult = table.Process(ProcessType.Full);
    // ... handle result ...
}
                
Tip: Use incremental processing for large fact tables to significantly reduce processing time and resource consumption. This involves processing only new or modified data since the last refresh.

Monitoring Processing Jobs

You can monitor the status of your processing jobs in the Azure portal by navigating to your Analysis Services resource, then selecting Models, and clicking on the relevant database. The Activity tab will show recent processing operations and their outcomes.

Note: Ensure that the service principal or managed identity used for automated processing has the necessary permissions (e.g., Admin role) on the Azure Analysis Services database.
Warning: Performing a full process on a very large model during peak usage hours can impact performance for users. Schedule processing during off-peak times or consider using incremental processing.

Troubleshooting Processing Errors

If a processing job fails, check the following:

Detailed error information can often be found in SSMS logs or by examining the results of programmatic processing operations.