Forum Discussion
How to use only 1 parameter to switch different database connections rather than 2?
- 3 years ago
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.
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 ❤️
- v-jingzhang3 years agoCommunity Support
I don't think it is related to the solution with parameter. May I know where you see the requirement?