Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
3 |