Skip to content

A tool for managing the processing of Analysis Services, Azure Analysis Services and Power BI Premium models.

License

Notifications You must be signed in to change notification settings

m-kovalsky/ProcessingManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Make sure to read my blog post on this tool!

Processing Manager is a tool that allows you to set customized processing 'batches' for a tabular model. This tool runs inside of Tabular Editor's Advanced Scripting window and is compatible for all incarnations of tabular - SQL Server Analysis Services, Azure Analysis Services, and Power BI Premium (using the XMLA R/W endpoint).

Processing Manager

Purpose

This tool is designed to simplify the management of processing large tabular models.

Running the Tool

To use the tool, download the ProcessingManager.cs script, paste it into the Advanced Scripting window in Tabular Editor and click the play button (or press F5). The tool itself does not process the model. It simply saves the instructions for processing the batches as metadata (annotations) within the model.

Make sure to click the 'Save' button within the Processing Manager tool after making changes. If the 'Save' button is not clicked your changes will not be saved back to the model.

Note: For easier access, it is recommended to save the script as a Custom Action.

Note: If you are using the Processing Manager tool via a model created in Power BI Desktop (via opening Tabular Editor from the External Tools ribbon) you must ensure this setting is checked within Tabular Editor:

File -> Preferences -> Allow unsupported Power BI features (experimental)

Processing the Batches

After you set up a batch using the Processing Manager tool and deploy your model to a server, you can process the batch using this method.

  1. Download the ProcessBatches.cs script and save it to your computer.
  2. Run the code below in the command prompt (filling in the <parameters>) according to the variety of tabular you are using.

Since each of the scripts below uses an Environment Variable (set batchName=), there is no need to copy the ProcessBatches.cs file for each batch. The same ProcessBatches.cs file can be referenced for processing all batches. Setting the 'batchName' Environment Variable instructs the code which batch to process.

Note that although it is possible to run this in the command prompt, it is recommended to run the following processing scripts by integrating them into an application as discussed below.

set batchName=<Batch Name>
start /wait /d "C:\Program Files (x86)\Tabular Editor" TabularEditor.exe "<Server Name>" "<Database Name>" -S "<C# Script File Location (ProcessBatches.cs)>"
set batchName=<Batch Name>
start /wait /d "C:\Program Files (x86)\Tabular Editor" TabularEditor.exe "Provider=MSOLAP;Data Source=asazure://<AAS Region>.asazure.windows.net/<AAS Server Name>;User ID=<xxxxx>;Password=<xxxxx>;Persist Security Info=True;Impersonation Level=Impersonate" "<Database Name>" -S "<C# Script File Location (ProcessBatches.cs)>"

Running this in Power BI Premium requires enabling XMLA R/W endpoints for your Premium Workspace. An additional requirement is setting up a Service Principal.

set batchName=<Batch Name>
start /wait /d "C:\Program Files (x86)\Tabular Editor" TabularEditor.exe "Provider=MSOLAP;Data Source=powerbi://api.powerbi.com/v1.0/myorg/<Premium Workspace>;User ID=app:<Application ID>@<Tenant ID>;Password=<Application Secret>" "<Premium Dataset>" -S "<C# Script File Location (ProcessBatches.cs)>" 

Additional Features

  • Clicking the 'Sequence' check box will enable the Sequence command and allow you to set the Max Parallelism property (if using the Sequence command, the Max Parallelism value must be greater than 0).
  • Export Script: When in the Summary view of the Processing Manager tool (the last window), you will see the Script button. Clicking it will dynamically generate a C# script which can be used to recreate the selected processing batch (by running the script in the Advanced Scripting window in Tabular Editor). The script is automatically saved as a .cs file to your desktop. This may come in handy in scenarios where you need to copy batch modifications to different versions of a model (i.e. between branches or servers).

Integration Applications

The command line code may be integrated into any application which is able to run command line code. Examples of such applications include Azure DevOps and Azure Data Factory. Integrating the Processing Manager solution into these applciations will streamline the processing operations of your tabular model(s). In order to use these applications for a Power BI Premium dataset you will need to set up a Service Principal and a Key Vault.

Make sure to read my blog post for more information on setting up the processing within Azure DevOps.

Requirements

Tabular Editor version 2.12.1 or higher.

About

A tool for managing the processing of Analysis Services, Azure Analysis Services and Power BI Premium models.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages