Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello everyone,
Based on many related helpful posts changing connections by using 2 parameters (just like this one ) but I faced to this task when I have theses Azure SQL databases with different URL and db-name:
| Name | Stage | Server URL |
| dev | Development | dev.database.windows.net |
| uat | Test | uat.database.windows.net |
| prod | Production | prod.database.windows.net |
How to use only 1 parameter to changing datasource which corresponds to each stage of the development lifecycle?
Many thanks to you guys
Solved! Go to Solution.
When you connect to Azure SQL databases, Power Query uses Sql.Database function. It requires server and database as two separate parameters. So it seems not possible to use only one parameter to switch the data source.
Sql.Database(server as text, database as text, optional options as nullable record) as table
If you use Odbc.DataSource, it may be possible to use only one parameter as it only requires connectionString. I haven't tested this yet. However ODBC connector only supports Import mode and the query performance is not as well as the SQL Server database connector.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @TungNguyen_19 ,
You can follow this link :-
https://radacad.com/change-the-source-of-power-bi-datasets-dynamically-using-power-query-parameters
Hope this is helpful.
Thanks,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
Proud to be a Super User!
This is not the solution for my problem, I mean yes we can use parameter but in my problem we have separate different servers, different tables and I want to switch between them by only 1 parameter (that is the Stage parameter which ties pair server and table for each stage as I described in the table above). This is the idea and I don't know how to do it?
Thanks
When you connect to Azure SQL databases, Power Query uses Sql.Database function. It requires server and database as two separate parameters. So it seems not possible to use only one parameter to switch the data source.
Sql.Database(server as text, database as text, optional options as nullable record) as table
If you use Odbc.DataSource, it may be possible to use only one parameter as it only requires connectionString. I haven't tested this yet. However ODBC connector only supports Import mode and the query performance is not as well as the SQL Server database connector.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @v-jingzhang
One requirement arised that "Power BI deployment pipelines must NOT be used." Can you please explain what does this mean and does it related to this solution using parameter?
Many thanks for your support ❤️
I don't think it is related to the solution with parameter. May I know where you see the requirement?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |