Forum Discussion

JIlicGrECo's avatar
JIlicGrECo
Frequent Visitor
2 years ago
Solved

Power BI Embedded - getting it to work with Fabric Delta table source

I have a dataset consisting of several Delta tables that replaced an old Synapse SQL Serverless dataset and two Power BI reports. On top of that there is a webapp with an Azure Function in C# backend that embeds the PBI report.

 

I recreated the semantic model (that was in Direct Query for the old Synapse SQL, it was too big for Import mode) first as a Direct Lake model. I rewired the reports to the new model and I checked that they worked in the PBI Service and they also worked in PBI Desktop. In the Azure function, I changed getting the embed token REST API call from GenerateTokenRequest to GenerateTokenRequestV2. I enlisted the Entra app registration with the workspace, specified all the workspace, report and dataset IDs, but got the following error response when making the embed token call: 

 

 

{"error":{"code":"InvalidRequest","message":"Embedding a DirectLake report is not supported"}}

 

 

 

I found out that the DirectLake mode is not supported for the Power BI Embedded (I hope it will be available soon to have the full Fabric potential unlocked in our embedded reports), so I tried to make a workaround. I made a Direct Query layer pointing to the Direct Lake semantic model (slower, but I thought at least it should work), specified the new semantic model's ID, in the token request and also just for any case I set the switch in the PBI service for the base DirectLake model to work only in DirectQuery mode. I got the following error message for the embed token request: 

 

 

{"error":{"code":"InvalidRequest","message":"Generate token request for proxy model should include the core model ID"}}.

 

 

When I added the core model dataset ID as well to the request, I got the old message:

 

 

{"error":{"code":"InvalidRequest","message":"Embedding a DirectLake report is not supported"}}

 

 

 

I also tried changing the data source in the original model, through the desktop app, to make it point to the SQL analytics endpoint of the lakehouse where the Delta tables are, but I was getting the following message for all the tables: 

The key didn't match any rows in the table.

 

Is there any way the Embedded mode can work with the Delta table source?

 

Thanks, best regards,

Janko Ilić

4 Replies