Creating a function app to refresh a data model in azure analysis services based on a timer trigger. Using Microsoft.AnalysisServices.NetCore package.
What is the correct way to format the connection string? have i done this correctly?
// analysis services details
string serverName = "myserver";
string databaseName = "mydb";
string userId = "userId";
string password = Environment.GetEnvironmentVariable("PWD");
//connection string
var connectionString = $"Provider=MSOLAP;Data Source=asazure://uksouth.asazure.windows.net/{serverName};Initial Catalog={databaseName};User ID={userId};Password={password};Persist Security Info=True;Impersonation Level=Impersonate";
Data Source
has to be only the server name.It has to be
var connectionString = $"Provider=MSOLAP;Data Source={serverName};Initial Catalog={databaseName};User ID={userId};Password={password};Persist Security Info=True;Impersonation Level=Impersonate;";
Refer blogs by Sanjay Bhagia and James Broome even it explains the same.
I have tried to connect it from my Application.
AdomdConnection
using Microsoft.AnalysisServices.AdomdClient
;My .csproj
file:
<PackageReference Include="Unofficial.Microsoft.AnalysisServices.AdomdClientNetCore" Version="15.3.1.2" />