refresh AAS tabular model synchronously using Synapse Analytics ?

Rajesh Manjunath 0 Reputation points

can you please help provide any pointers towards refresh AAS tabular model synchronously using Synapse Analytics ?

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,350 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Amira Bedhiafi 15,046 Reputation points

    I think you would typically use Azure Synapse as your data source, and then programmatically trigger a refresh operation on your AAS model. Here's a general guide on how to achieve this:

    1. Data Source :
    • Ensure that your AAS tabular model has Azure Synapse Analytics as its data source.
    • Proper connection strings and credentials should be set up in AAS to connect to Synapse Analytics.
    1. Use Azure Automation or Logic Apps:
      • You can set up Azure Automation with a runbook or use Azure Logic Apps to periodically or on-demand refresh your AAS model.
    2. Azure Analysis Services REST API:
      • AAS provides a REST API that allows you to manage and refresh your models. You can use this API to synchronously refresh your tabular model.
               $resourceGroupName = "Your-Resource-Group"
               $serverName = "Your-AAS-Server-Name"
               $databaseName = "Your-AAS-Database-Name"
               $modelRefreshUrl = "$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.AnalysisServices/servers/$serverName/databases/$databaseName/refreshes?api-version=2017-08-01-preview"
               # Use Azure AD token for authentication
               $token = (Get-AzAccessToken -ResourceUrl
               $headers = @{
                 "Authorization" = "Bearer $token"
                 "Content-Type" = "application/json"
               $body = @{
                 "type" = "Full"
               } | ConvertTo-Json
               # Invoke REST API to refresh model
               Invoke-RestMethod -Method Post -Uri $modelRefreshUrl -Headers $headers -Body $body
    0 comments No comments

  2. Nandan Hegde 29,886 Reputation points MVP
    0 comments No comments