Forum Discussion
Unable to delete Data Source in PowerBI Service using PowerBI API
I confirmed from the data in the report, that while all Data Import tables are pointing to "QA-DataSource", Direct Query tables in the model are still pointing to the "Dev-DataSource", and did not get updated by the UpdateParameters call.
How can I update the data source for Direct Query tables in a composite data model? Is there another API call for this?
Hi Anonymous ,
From the screenshot it seems you are having 2 different data source credentials, in other words your both query like import and direct using 2 different data sources and credentials.
I'd recommed to update/create both the queries (import mode and direct query mode ) to get the values from the parameters like database and server names
Ideally you should have a single parameter(s) (servername/database) for your both queries (import and direct query )
- Anonymous6 years agoNot applicable
Hi Jayendran ,
As I mentioned in in my first message, the pbix file has only ONE data source "Dev-DataSource" for both direct query and import queries. It is using parameters to populate the connection string for this data source. I am trying to update the data source in PowerBI Service using REST APIs after the pbix has been uploaded.
The screenshot above is after I ran the following APIs to update parameters and credentials for "QA-DataSource":
- datasets/{datasetId}/Default.UpdateParameters POST
- gateways/{gatewayId}/datasources/{dataSourceId} PATCH
Running above APIs creates a second data source (credentials) in the service. So, now I see both QA-DataSource and Dev-DataSource both.
By running the report I found out that the Data Import queries were updated to point to QA-DataSource, but the ones using Direct Query still point to Dev-Datasource.
Is this scenario not supported?
- Jayendran6 years agoSolution Sage
Hi Anonymous ,
Ah I gotcha ! The update parameters not supported for direct queries, due to this you having some problem.
Solution:
Instead of using parameters you should use Update Data Source API