Running DAX queries from an Azure SQL stored procedure

Clayton DuVall 21 Reputation points
2022-03-22T17:43:09.85+00:00

We have an Azure SQL db and an Azure Analysis Services instance. We'd like to write a stored procedure in Azure SQL that will connect to Azure Analysis Services, run a DAX query and store the results in an Azure SQL table. Is there a way to do this. For the OnPrem SQL Server, we would simply create a linked server connection to Analysis Services to do this. Any help or information would be greatly appreciated.

Thanks!
Clayton

Azure SQL Database
Azure Analysis Services
Azure Analysis Services
An Azure service that provides an enterprise-grade analytics engine.
463 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nandan Hegde 32,831 Reputation points MVP
    2022-03-23T06:19:01.52+00:00

    Hey,
    Based on my knowledge, unfortunately the above scenario is not possible .

    You can copy data from AAS to Azure DB via below steps:

    1. Custom code (.net or python) and copy into Azure DB
      https://endjin.com/blog/2020/03/azure-analysis-services-how-to-execute-a-dax-query-from-net

    2) Have an IaaS server/On Prem server with linked server and copy via ADF based on below blog :
    https://datasharkx.wordpress.com/2021/03/16/copy-data-from-ssas-aas-through-azure-data-factory/

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.