Forum Discussion
SwapnilMahajan1
3 years agoNew Member
Changing Power BI Data source
Hello everyone, During an interview, I encountered this question and I'm looking for an answer to it. Despite conducting a Google search, I haven't been able to find a response that fully satisfies ...
vanessafvg
3 years agoCommunity Champion
i guess because you are asking this retrospectively its after the fact but if you parameterize your connections from the get go, so not post the fact then changing the environment variable should allow you to do this, (in theory, of course theory isn't always that simple, specially cos on prem to cloud which may have differences)
the other way you could possibly also do it is via the xmla point (which you can only use if you have premium)
although I am not sure how you would loop through each connection. but changing it in tabular editor would be easier.
i think what they probably referring to is using the Rest API and doing it via the api
https://learn.microsoft.com/en-gb/rest/api/power-bi/gateways/update-datasource