Deploy a tabular model from Visual Studio
Applies to: SQL Server Analysis Services Azure Analysis Services Power BI Premium
Deploying a tabular model project from Visual Studio is a simple process, however, certain steps must be taken to ensure your model is deployed to the correct server instance or Power BI workspace and with the right configuration options.
Tabular models are defined with several deployment-specific properties. When you deploy, a connection to the instance specified in the Server property is established. A new model database or dataset with the name specified in the Database property is then created on that instance, if one does not already exist. Metadata from the model project's Model.bim file is used to configure objects in the model database on the deployment server. With the Processing Option, you can specify whether or not just the model metadata is deployed, creating the model database, or if Default or Full is specified, impersonation credentials used to connect to data sources are passed in-memory from the model workspace database to the deployed model database. Analysis Services then runs processing to populate data into the deployed model. Once the deployment and processing is complete, the model can then be connected to by client reporting applications like Power BI and Excel.
Deploying a tabular model project from Visual Studio to a Power BI Premium workspace has a few extra steps to complete processing on the first deployment. To learn more, see Deploy model projects from Visual Studio to Power BI.
The project deployment options and deployment server properties specify how and where a model is deployed to a staging or production Analysis Services environment. While default property settings are defined for all model projects, depending on your particular deployment requirements, you can change these property settings for each project.
|Processing Option||Default||Specifies the type of processing required when changes to objects are deployed. This property has the following options:
Default - This setting specifies Analysis Services will determine the type of processing required. Unprocessed objects will be processed, and if required, recalculating attribute relationships, attribute hierarchies, user hierarchies, and calculated columns. This setting generally results in a faster deployment time than using the Full processing option.
Do Not Process - This setting specifies only the metadata will be deployed. After deploying, it may be necessary to run a process operation on the deployed model to update and recalculate data.
Full - This setting specifies that both the metadata is deployed and a process full operation is performed. This assures that the deployed model has the most recent updates to both metadata and data.
|Transactional Deployment||False||Specifies whether or not the deployment is transactional. By default, the deployment of all or changed objects is not transactional with the processing of those deployed objects. Deployment can succeed and persist even though processing fails. You can change this to incorporate deployment and processing in a single transaction.|
|ADAL Cache||Default||Specifies use of the USEADALCache connection string property when connecting to Azure Analysis Services.|
|Server||localhost||Specifies the Azure Analysis Services server resource URL, Power BI Workspace Connection URL, or SQL Server Analysis Services instance name to which the model will be deployed.|
|Edition||The same edition as the instance in which the Workspace database is located.||This property specifies the edition of the Analysis Services server to which the model will be deployed. The server edition defines various features that can be incorporated into the project. By default, the edition will be of the local Analysis Services server, which if you are using an integrated workspace will be the Visual Studio edition.|
|Database||<projectname>||This property specifies the name of the Analysis Services database in which model objects will be instantiated upon deployment. This name will also be specified in a reporting client data connection or an .bism data connection file.
You can change this name at any time when you are authoring the model. If you change the name after you have deployed the model, changes that you have made after deployment will not affect the model that you previously deployed. For example, if you open a solution named TestDB and deploy your solution with the default model Database name Model, and then modify the solution and renamed the model Database Sales, the instance of Analysis Services the solutions were deployed to will display separate databases, one named Model and one named Sales.
|Model Name||Model||This property specifies the model name as shown in client applications and tools.|
Deploy a tabular model
In Solution Explorer, right-click the project name, and then click Deploy.
The Deploy dialog box will appear and indicate the status of the metadata deployment and the processing (unless Processing Option property is set to Do Not Process) of each table included in the model.
The Deploy dialog box enables you to monitor the progress of a Deploy operation. A deploy operation can also be stopped.
Indicates whether the Deploy operation was successful or not.
Lists the metadata items that were deployed, the status for each metadata item, and provides a message of any issues.
Click to halt the Deploy operation. This option is useful if the Deploy operation is taking too long, or if there are too many errors.
Deploying to a Power BI Premium workspace
When deployed the first time, a dataset is created in the workspace by using metadata from the model.bim. As part of the deployment operation, after the dataset has been created in the workspace from model metadata, processing to load data into the dataset from data sources will fail.
Processing fails because unlike when deploying to an Azure or SQL Server Analysis Server instance, where data source credentials are prompted for as part of the deployment operation, when deploying to a Premium workspace data source credentials cannot be specified as part of the deployment operation. Instead, after metadata deployment has succeeded and the dataset has been created, data source credentials are then specified in the Power BI Service in dataset settings. In the workspace, click Datasets > Settings > Data source credentials > Edit credentials.
During public preview, role memberships cannot be specified in the model project. If your model project fails to deploy, make sure there are no users specified in any roles. After the model has successfully deployed, specify users for dataset roles in the Power BI service.
For DirectQuery models, if the model contains calculated items, calculated columns, or calculated tables, after being deployed you must perform a Process Recalc on the database. To learn more about processing a model database from SSMS, see Process Database, Table, or Partition.
After the deployment process is complete, use SSMS to connect to the server or workspace and verify the new model database object has been created.