3

I have setup an Azure automation account and Web hook to process my analysis services database. I am calling that using Web activity (POST method) in Azure Data Factory to trigger the cube refresh. Web activity method is working fine but it returns back without waiting for refresh to complete.

Now, I want to execute further steps only after the Cube processing is complete. Is there a way to detect when the cube is refreshed and then start the next step of activities in data factory?

AnkurAggarwal
  • 106
  • 1
  • 8
  • (upvoted) same question here. – SouravA Apr 02 '19 at 14:23
  • Since this is an asynchronous process, I would (if this was upto me) create a separate pipeline in Azure Data Factory to continue with rest of the steps. This pipeline could be timer triggered (every X minutes) and would check the status of the cube refresh [check here : https://stackoverflow.com/q/11899250/314763] – frictionlesspulley Apr 02 '19 at 19:42
  • I know there are ways to check the Tabular model last refresh date and that is mostly by running MDX or XMLA queries. But there is no way of executing those MDX/XMLA queries in data factory and getting output from those. And putting a hard-coded time constraints on a pipeline would not be a good idea as that could cause issues in days where the cube refresh takes little longer than the expected time. – AnkurAggarwal Apr 03 '19 at 00:47

1 Answers1

3

After lot of research, I was able to achieve this by using Microsoft recommended REST API's to process my Analysis Services Database and Get the Refresh status back.

Here are some helpful links below:

REST API: https://learn.microsoft.com/en-us/azure/analysis-services/analysis-services-async-refresh

GitHub References:

  1. This link contains the documentation specifying the inputs and steps to Process Cube and Wait till the refresh is completed - https://github.com/furmangg/automating-azure-analysis-services/blob/master/README.md#processazureas

  2. Code Repository: https://github.com/furmangg/automating-azure-analysis-services/tree/master/ADFv2

Unlike other solutions which leverage external services like Azure Logic Apps or custom ADF .NET activities running in Azure Batch, this approach uses only built-in activities which depend on no external services other than Azure Analysis Services. So, I changed my solution to NOT use Azure Automation account or Webhook to process the cube.

Feel free to get in touch if you need further details.

Hope this helps!!

AnkurAggarwal
  • 106
  • 1
  • 8
  • Good job. I was about to write about how I achieved it using Logic Apps. – SouravA Apr 17 '19 at 10:14
  • Hello! I am reading this post after I have tried to make a similar data factory pipeline to work. I want to make a ProcessAdd for some partitions, but I have read (and tried) that ProcessAdd is not supported in the REST API. Therefore I need to write a Powershell code for this through Azure automation then create a web hook and put that into a web activity in data factory. What I want is to simulate the same operation and return a success or failed code from the web activitiy. Has anyone managed this or has any suggestions to this? – Geir Forsmo Nov 23 '21 at 09:42
  • Hi @GeirForsmo, I don't think you can do that using Web Activity as even Microsoft documentation clearly mentions that "Add type is not supported". https://learn.microsoft.com/en-us/azure/analysis-services/analysis-services-async-refresh#parameters – AnkurAggarwal Dec 02 '21 at 23:15