Search code examples
webhooksazure-data-factoryazure-automationazure-runbook

Trigger next step in data factory after Tabular model refresh is complete


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?


Solution

  • 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!!