March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I'm using Microsoft.PowerBI.Api 4.18 in C#
We allow clients to build their own PBIX files in Desktop and upload to our portal.
The general upload method is
1. Import File
2. Take Ownership of Datasets
3. Update credentials for SQL Server Connections
Some of the PBIX files contains multi data sources. It works fine when
* I have a file and a SQL Import
* I have a DirectQuery and a SQL Import
It does not work when
* I have a file and a Direct Query
Using the client.Datasets.GetDatasources(_groupId, dataset.Id).Value API I can see that in a working scenario it looks like
however in my failed scenario I get no datasourceId or gatewayId
Looking at the Direct Query in the Semantic Model I get the following error
I have no idea whats going wrong as my searches have been yielded nothing.
Any help please?
I've continued to test with other permuations and no matter what I do, once I include a File Data Source with a Direct Query the direct query will fail with the below message.
It appears that the Direct Query will fail due to a gateway error associated witht the file.
You should not allow file data sources on a user's computer. It requires a gateway, worst case a gateway on that same computer - on every one of them.
Only accept files stored on OneDrive. Those do not require gateways as long as you don't attempt to merge queries with other on-prem data sources.
Thank you for your response.
The goal here is not to allow ongoing accesss to the file, it become static data is works fine by itself. It can't be refreshed from our service and that is well understand and accepted by the client and us.
The problem is that when a file and a Direct Query are in the PBIX the Direct Query gets broken in the import.
This does not occur if I mix a file with a SQL Import or a SQL Import with a Direct Query.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
8 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
10 | |
3 | |
2 | |
2 | |
2 |