Forum Discussion
Unable to delete Data Source in PowerBI Service using PowerBI API
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?
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