Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mak82pk
Helper I
Helper I

Power BI embed Azure SQL direct query error Couldn't load the schema for the database model Couldn'

Couldn't load the schema for the database model
Couldn't load the model schema associated with this report. Make sure you have a connection to the server, and try again.
Please try again later or contact support. If you contact support, please provide these details.
Server xxxx.database.windows.net
Database xxxx
Correlation ID6961a444-0a98-0ead-b1b5-95952f16db63
ConnectionType{FieldValue}
Activity IDf13c0c9e-d4d5-410d-91f8-955658d9dfe3
Request ID5b1a8a3e-c687-b3b9-0d9c-1078ac99d16e
TimeWed Nov 22 2017 18:36:45 GMT+0400 (Arabian Standard Time)
Version13.0.3154.166
 
 
I am using azure sql server direct query with Power bi embed. I have already given privacy level "public"  rights to azure db from Power BI desktop.
 
Does direct query support report filtering ? I am using Power BI embeded javascript SDK.
Imported the reported to Azure and provided correct credentials
<add key="powerbi:AccessKey" value="xxxxM9xNxxxxxxxxxT5L0UuRkh6SDhH02/djcCgyaxFodkA==" />
<add key="powerbi:WorkspaceCollection" value="xxx" />
<add key="powerbi:WorkspaceId" value="bf5fxxx0c6-xxxxxx" />
 
All other reports without direct query are working.
 
 
 
 
 
 
 
 
 
5 REPLIES 5
Eric_Zhang
Employee
Employee


@mak82pk wrote:
Couldn't load the schema for the database model
Couldn't load the model schema associated with this report. Make sure you have a connection to the server, and try again.
Please try again later or contact support. If you contact support, please provide these details.
Server xxxx.database.windows.net
Database xxxx
Correlation ID6961a444-0a98-0ead-b1b5-95952f16db63
ConnectionType{FieldValue}
Activity IDf13c0c9e-d4d5-410d-91f8-955658d9dfe3
Request ID5b1a8a3e-c687-b3b9-0d9c-1078ac99d16e
TimeWed Nov 22 2017 18:36:45 GMT+0400 (Arabian Standard Time)
Version13.0.3154.166
 
 
I am using azure sql server direct query with Power bi embed. I have already given privacy level "public"  rights to azure db from Power BI desktop.
 
Does direct query support report filtering ? I am using Power BI embeded javascript SDK.
Imported the reported to Azure and provided correct credentials
<add key="powerbi:AccessKey" value="xxxxM9xNxxxxxxxxxT5L0UuRkh6SDhH02/djcCgyaxFodkA==" />
<add key="powerbi:WorkspaceCollection" value="xxx" />
<add key="powerbi:WorkspaceId" value="bf5fxxx0c6-xxxxxx" />
 
All other reports without direct query are working.
 

@mak82pk

Per my test, DirectQuery works fine in Power BI Embedded. Did you update connection string and credential after importing the pbix file?

 

By the way, the legency Power BI Embedded is being deprecated and will continue working till end of June 2018, just consider migrate it to Power BI Service.

No i did not make any changes to DB after import

dq-error.JPG


@mak82pk wrote:

No i did not make any changes to DB after import

dq-error.JPG


@mak82pk

I don't think this snapshot from Power BI Service has anything to do with the error in your original post. You're using Power BI Embedded workspace collection, right? Have you ever tried to update connection string and credential as in my previous reply?

Yes but the code i am using does not take db connection string

 

       public DashboardController()
        {
            this.workspaceCollection = ConfigurationManager.AppSettings["powerbi:WorkspaceCollection"];
            this.workspaceId = ConfigurationManager.AppSettings["powerbi:WorkspaceId"];
            this.accessKey = ConfigurationManager.AppSettings["powerbi:AccessKey"];
            this.apiUrl = ConfigurationManager.AppSettings["powerbi:ApiUrl"];
        }

        public async Task<ActionResult> Report(string reportId)
        {
            using (var client = this.CreatePowerBIClient())
            {
                var reportsResponse = await client.Reports.GetReportsAsync(this.workspaceCollection, this.workspaceId);
                var report = reportsResponse.Value.FirstOrDefault(r => r.Id == reportId);
                var embedToken = PowerBIToken.CreateReportEmbedToken(this.workspaceCollection, this.workspaceId, report.Id);

                var viewModel = new ReportViewModel
                {
                    Report = report,
                        
                    AccessToken = embedToken.Generate(this.accessKey)
                };

                return View(viewModel);
            }
        }

@mak82pk

After importing the pbix file in direct query mode to Azure SQL to Power BI Embedded workspace on Azure, have you updated the connection string and credential(see how)? This is the prerequisite for embedding.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors