Deploying Models to Azure Analysis Services

Last updated: November 15, 2023

This guide details the various methods and best practices for deploying your Azure Analysis Services models to your Azure environment.

Deployment Methods

There are several ways to deploy your Analysis Services models. The most common methods include:

1. Using Visual Studio with SQL Server Data Tools (SSDT)

Visual Studio with SSDT provides a robust development experience and includes direct deployment capabilities.

  1. Open your Analysis Services project in Visual Studio.
  2. In the Solution Explorer, right-click on your project.
  3. Select Deploy.
  4. The Analysis Services Deployment Wizard will appear. Follow the prompts to select your server and database name.

This method is ideal for interactive development and deployment cycles.

2. Using Tabular Editor

Tabular Editor is a popular third-party tool that offers advanced features for managing and deploying Analysis Services models.

Tabular Editor is excellent for scripting deployments and managing complex models.

Note on Tabular Editor

Ensure you have the latest version of Tabular Editor installed and configured to connect to your Azure Analysis Services endpoint.

3. Using Azure DevOps and CI/CD Pipelines

For automated deployments, integrating with Azure DevOps or other CI/CD tools is highly recommended.

This approach ensures consistency, repeatability, and reduces manual errors.


# Example PowerShell snippet for deployment using ASMO
$server = New-Object Microsoft.AnalysisServices.Tabular.Server
$server.Connect("your_azure_analysis_services_server_name.asazure.windows.net")

$database = $server.Databases.GetByName("YourDatabaseName")
$database.Deploy("path/to/your/model.bim", $true) # $true for overwrite
$server.Disconnect()
            

Deployment Considerations

Server Names and Connection Strings

When deploying, you'll need the fully qualified server name. This typically looks like:

your_server_name.asazure.windows.net

Ensure your firewall rules allow access from your deployment agent or development machine.

Database Existence

You can choose to deploy to an existing database or create a new one during deployment. Be mindful of existing data and schema changes.

Overwrite vs. Merge

Most deployment tools offer options to overwrite an existing database or merge changes. Overwriting is simpler but purges existing data. Merging can be more complex but preserves data if done correctly.

Important: Backup Before Deployment

Always back up your Analysis Services database before performing a significant deployment, especially when overwriting or making schema-breaking changes.

Permissions

The account or service principal used for deployment must have the necessary permissions on the Azure Analysis Services server (e.g., Server Administrator role).

Post-Deployment Steps

By following these guidelines, you can ensure a smooth and efficient deployment process for your Azure Analysis Services models.