Forum Discussion
Connection via link://alias fails
1. Is the link:// protocol specific to PowerBI or Azure Analysis Services
2. If PowerBI, does that mean a link can point to any valid service e.g. an on premise analysis service?
Secondly, I've been trying to use the link alias and it doesn't work.
Connecting to an Azure Analysis Service directly is just fine e.g. the sample adventureworks model on connection:
asazure://westeurope.asazure.windows.net/weuxxxxxxxxzzzzzzzzz
I have created an Azure function with an HTTPS trigger so that a GET request to:
https://zzzzzzzzz.azurewebsites.net/api/cube/test
returns exactly the asazure:// string above that works as a direct connection.
However, when requesting PowerBI connect to:
link://zzzzzzzzz.azurewebsites.net/api/cube/test
(as per documentation: https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-server-alias)
I get the following error:
Feedback Type:
Frown (Error)
Error Message:
An error occurred while loading the model for the item or data source 'OpenConnectionError'. Verify that the connection information is correct and that you have permissions to access the data source.
Stack Trace:
at Microsoft.PowerBI.ReportingServicesHost.LocalReportProcessingHost.ExecuteSchemaCommand[T](DataSourceInfo dataSourceInfo, IDbConnectionPool connectionPool, ITracer tracer, IConnectionUserImpersonator connectionUserImpersonator, ITelemetryService telemetryService, Func`2 action, String failTelemetryMessage)
at Microsoft.PowerBI.ReportingServicesHost.LocalReportProcessingHost.GetModelMetadata(IASConnectionInfo connectionInfo, DataSourceInfo dataSourceInfo, IDbConnectionPool connectionPool, ITracer tracer, String modelMetadataVersion, IConnectionUserImpersonator connectionUserImpersonator, ITelemetryService telemetryService)
at Microsoft.PowerBI.ReportingServicesHost.DataShapingHelper.GetModelMetadata(IPowerViewEngine powerViewEngine, IDbConnectionPool connectionPool, DataSourceInfo dataSourceInfo, IASConnectionInfo asConnectionInfo, Boolean useMsolapForCsdl, IConnectionUserImpersonator connectionUserImpersonator, ITelemetryService telemetryService, String maxModelMetadataVersion)
at Microsoft.PowerBI.ReportingServicesHost.ReportingSession.GetModel(String dataSourceName, String modelMetadataVersion)
at Microsoft.PowerBI.ReportingServicesHost.ReportingSession.GetModelAsStream(String dataSourceName, String modelMetadataVersion)
at Microsoft.PowerBI.ReportingServicesHost.ReportingSession.GetConceptualSchema(String modelMetadataVersion, ParseConceptualSchema parse, ModelDaxCapabilities& capabilities)
at Microsoft.PowerBI.ExploreHost.Utils.ExploreHostUtils.GetConceptualSchemaImpl(IPowerViewHandler powerViewHandler, String databaseID, String maxModelMetadataVersion, ModelDaxCapabilities& capabilities)
at Microsoft.PowerBI.ExploreHost.Utils.ExploreHostUtils.HandleModelRetrievalExceptions[T](Func`1 wrappedCall, String databaseID)
at Microsoft.PowerBI.ExploreHost.Utils.ExploreHostUtils.GetConceptualSchemaAndHandleExceptions(IPowerViewHandler powerViewHandler, String databaseID, String maxModelMetadataVersion, ModelDaxCapabilities& daxCapabilities)
at Microsoft.PowerBI.ExploreHost.ExploreClient.GetConceptualSchema(String databaseID, String maxModelMetadataVersion)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.GetConceptualSchema()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.get_DataModel()
at Microsoft.PowerBI.Client.Windows.Report.GetCurrentModelAuthoringCapabilities()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.GetConceptualSchema()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.get_DataModel()
at Microsoft.PowerBI.Client.Windows.Report.GetCurrentModelAuthoringCapabilities()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.GetConceptualSchema()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.get_DataModel()
at Microsoft.PowerBI.Client.Windows.Ribbon.ApplicationRibbonCommandActionHandler.CreateNewMeasureCommandParameter()
at Microsoft.PowerBI.Client.Windows.Ribbon.RibbonCommandBinder.<>c__DisplayClasse`1.<RegisterCommandForButton>b__c(UInt32 id)
at Microsoft.Mashup.Client.UI.Shared.UICommands.CommandAction.IsEnabled(UInt32 commandId)
at Microsoft.Mashup.Client.UI.Windows.Ribbon.RibbonCommandHandler.UpdateProperty(UInt32 commandId, PropertyKey& key, PropVariantRef currentValue, PropVariant& newValue)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.GetConceptualSchema()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.get_DataModel()
at Microsoft.PowerBI.Client.Windows.Report.GetCurrentModelAuthoringCapabilities()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.GetConceptualSchema()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.get_DataModel()
at Microsoft.PowerBI.Client.Windows.Ribbon.ApplicationRibbonCommandActionHandler.CreateNewMeasureCommandParameter()
at Microsoft.PowerBI.Client.Windows.Ribbon.RibbonCommandBinder.<>c__DisplayClasse`1.<RegisterCommandForButton>b__c(UInt32 id)
at Microsoft.Mashup.Client.UI.Shared.UICommands.CommandAction.IsEnabled(UInt32 commandId)
at Microsoft.Mashup.Client.UI.Windows.Ribbon.RibbonCommandHandler.UpdateProperty(UInt32 commandId, PropertyKey& key, PropVariantRef currentValue, PropVariant& newValue)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.GetConceptualSchema()
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLive.get_DataModel()
at Microsoft.PowerBI.Client.Windows.Ribbon.ApplicationRibbonCommandActionHandler.CreateNewCalculatedColumnTableNameCommandParameter()
at Microsoft.PowerBI.Client.Windows.Ribbon.RibbonCommandBinder.<>c__DisplayClasse`1.<RegisterCommandForButton>b__c(UInt32 id)
at Microsoft.Mashup.Client.UI.Shared.UICommands.CommandAction.IsEnabled(UInt32 commandId)
at Microsoft.Mashup.Client.UI.Windows.Ribbon.RibbonCommandHandler.UpdateProperty(UInt32 commandId, PropertyKey& key, PropVariantRef currentValue, PropVariant& newValue)
Stack Trace Message:
An error occurred while loading the model for the item or data source 'OpenConnectionError'. Verify that the connection information is correct and that you have permissions to access the data source.
Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Exception e)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.PowerBI.Client.Windows.Utilities.UIBlockingAwareExceptionHandler.HandleException(Exception e)
... too many lines
at Microsoft.PowerBI.Client.Program.Main(String[] args)
True
Enabled Preview Features:
PBI_shapeMapVisualEnabled
Disabled Preview Features:
PBI_newFromWeb
PBI_SpanishLinguisticsEnabled
CustomConnectors
PBI_variationUIChange
PBI_canvasTooltips
PBI_PythonSupportEnabled
PBI_showIncrementalRefreshPolicy
PBI_compositeModels
PBI_DB2DQ
Disabled DirectQuery Options:
PBI_DirectQuery_Unrestricted
TreatHanaAsRelationalSource
WER Parameters:
{"AppName":"PBIDesktop","AppVersion":"2.61.5192.601","ModuleName":"Microsoft.PowerBI.ReportingServicesHost.dll","Component":"Microsoft.PowerBI.ReportingServicesHost.LocalReportProcessingHost","Error":"Microsoft.ReportingServices.Diagnostics.Utilities.CannotRetrieveModelException","MethodDef":"ExecuteSchemaCommand","ErrorOffset":"171"}
So I managed to it it working but not by changing any of the URLs etc
The version that didn't work was this:
link://xxxxxxx.azurewebsites.net/api/cube/test
This is implemented as an Azure Function App.
Another version that did work is:
link://xxxxconfig20180828050651.azurewebsites.net/api/values
This is implemented as an ASP.NET core web app
There is no difference in their implementation as they both use the same C# internally to return the asazure: connection string.
They both return exactly the same response body.
Only the response headers are slightly different:
cache-control →no-cachecontent-encoding →gzipcontent-length →174content-type →text/plain; charset=utf-8date →Fri, 31 Aug 2018 08:20:42 GMTexpires →-1pragma →no-cacheserver →Microsoft-IIS/10.0vary →Accept-Encodingx-powered-by →ASP.NETandcontent-encoding →gzipcontent-type →text/plain; charset=utf-8date →Fri, 31 Aug 2018 08:20:47 GMTrequest-context →appId=cid-v1:4226b7bc-9f11-4d6c-a7fe-116613d6e058server →Kestrelstrict-transport-security →max-age=2592000transfer-encoding →chunkedvary →Accept-Encodingx-powered-by →ASP.NETRespectively.So why does one work and the other doesn't? What specific feature is PowerBI relying on in the second case?----
Also the reasons for the additional questions are:
1. The docs are not clear - are you saying all Azure Server names can be aliased like this?
2. I know this is an alias for Azure Analyis Services, however the link:// works in PowerBI but not Management Studio so I assume this is a PBI feature?
3. Azure Analysis Servcies.
4. My screen shots are exactly as per https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-server-alias so hence not posted. - The issue is not how the dialog is filled out but why one implementation doesn't work.
2 Replies
- v-jiascu-msftMicrosoft Employee
Hi jsnape,
Seems you don't permission to connect to the Azure Service.
1. It's an alias of Azure Server names.
2. As we can see from the doc, the alias is for the Azure Analysis Services server. What is yours?
3. Which connector did you use in PBI Desktop?
4. How did you input these values in the connector? Can you share some snapshots?
Best Regards,
Dale
- jsnapeRegular Visitor
So I managed to it it working but not by changing any of the URLs etc
The version that didn't work was this:
link://xxxxxxx.azurewebsites.net/api/cube/test
This is implemented as an Azure Function App.
Another version that did work is:
link://xxxxconfig20180828050651.azurewebsites.net/api/values
This is implemented as an ASP.NET core web app
There is no difference in their implementation as they both use the same C# internally to return the asazure: connection string.
They both return exactly the same response body.
Only the response headers are slightly different:
cache-control →no-cachecontent-encoding →gzipcontent-length →174content-type →text/plain; charset=utf-8date →Fri, 31 Aug 2018 08:20:42 GMTexpires →-1pragma →no-cacheserver →Microsoft-IIS/10.0vary →Accept-Encodingx-powered-by →ASP.NETandcontent-encoding →gzipcontent-type →text/plain; charset=utf-8date →Fri, 31 Aug 2018 08:20:47 GMTrequest-context →appId=cid-v1:4226b7bc-9f11-4d6c-a7fe-116613d6e058server →Kestrelstrict-transport-security →max-age=2592000transfer-encoding →chunkedvary →Accept-Encodingx-powered-by →ASP.NETRespectively.So why does one work and the other doesn't? What specific feature is PowerBI relying on in the second case?----
Also the reasons for the additional questions are:
1. The docs are not clear - are you saying all Azure Server names can be aliased like this?
2. I know this is an alias for Azure Analyis Services, however the link:// works in PowerBI but not Management Studio so I assume this is a PBI feature?
3. Azure Analysis Servcies.
4. My screen shots are exactly as per https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-server-alias so hence not posted. - The issue is not how the dialog is filled out but why one implementation doesn't work.