Trigger Azure Analysis Service Processing in Azure Data Factory

There is one important feature missing from Azure Data Factory. In SSIS, at the end of the ETL process when the new data has been transformed and load into data warehouse, the SSAS processing task can be run to process the cube immediately after the new data has flow into the data warehouse. However, Azure Data Factory does not ship with the OOTB Azure Analysis Service processing activity.

Thanks to the Analysis Services Management Object (AMO), a few lines of simple .Net code will fill the gap to process the Azure Analysis Service automatically.

Server asServer = new Server();
String asConnectionString = "{connection string to the azure analysis service}";
Database asDatabase = asServer.Databases.FindByName("{Azure analysis service DB name}");
asDatabase.Model.RequestRefresh({Processing Mode});

We can host and run the code using Azure Functions that allows us to schedule the AS model processing periodically. However, the problem with this approach is that the AS model is not processed immediately after the data warehouse refreshing in sequence.

Another approach is to create DotNetActivity activity and to run the .Net model processing code against Azure Batch. You can find some sample code and deployment instructions for this approach from Microsoft here.

You can then add the DotNetActivity activity at end of your Azure Data Factory pipeline.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s