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.
Is there a way to use the REST API to change the PostgreSQL datasource, specifically, change its database and server address?
Here is what I am doing:
The Update Datasources In Group API documentation says that it can only be used with "SQL Server, Azure SQL Server, Analysis Services, Azure Analysis Services, OData Feed, and SharePoint datasources. For other datasource types, use Update Parameters In Group".
The aforementioned Update Parameters In Group API requires that "All parameters must exist in the dataset." However, my dataset does not have any parameters, as far as I can tell, so I get errors when I try to set any parameters:
I can see the connection details using the Get Datasources In Group API (screenshot below). Is there any way to change them?
Solved! Go to Solution.
I figured out an answer to my own question, and want to share it with anyone else who gets stuck on this.
The Update Parameters In Group API call is the right approach. However, the dataset needs to be set up in advance to hold the database and server address in parameters, which can then be modified using the API.
To set up the data source with parameters, click Edit Queries within Power BI Desktop. There is an Edit Parameters option there. Create parameters with your connection info. Then, under Edit Queries > Data source settings, Change the data source to use these parameters instead of explicitly specifying the connection strings. Here is a screenshot:
Hope this helps!
I figured out an answer to my own question, and want to share it with anyone else who gets stuck on this.
The Update Parameters In Group API call is the right approach. However, the dataset needs to be set up in advance to hold the database and server address in parameters, which can then be modified using the API.
To set up the data source with parameters, click Edit Queries within Power BI Desktop. There is an Edit Parameters option there. Create parameters with your connection info. Then, under Edit Queries > Data source settings, Change the data source to use these parameters instead of explicitly specifying the connection strings. Here is a screenshot:
Hope this helps!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |