Forum Discussion

ngoodweiler's avatar
ngoodweiler
Frequent Visitor
1 year ago

Change Data Source Settings Without Refreshing Before Publishing

Hello

 

I am having an issue with a report I built that uses Python scripts. I developed the report on my own computer because my company will not allow Python to be installed on our remote desktops. I got everything working correctly and published it, knowing that Python would not work until they got it installed on the server that has the gateway (or set up a personal gateway on that server) which they finally did recently. The problem I have is that I was out on parental leave the last couple of months and during that time, the SQL servers were migrated to an Azure environment and requires using a remote desktop to access them. I went through and changed all the reports we have that use those servers by changing the data source settings, refreshed, saved, and republished without any issue, but with my report that uses Python, I can't refresh the data because as I mentioned before, the remote desktops don't (and will not) have Python.

 

How can I go about changing the data sources to the new SQL servers without refreshing the queries, so that I can save and publish the report? 

 

I tried disabling "include in report refresh" for all queries, however that in itself triggers a refresh when applying the changes. I have read that I can use parameters in the queries to set the SQL servers in the Power BI Service, but wouldnt that also require a refresh to apply the query changes?

 

In summary - I need to update data source settings without triggering any report refreshes on Power BI Desktop so that the report can refresh in the Service.

1 Reply

  • Hi ngoodweiler 

    It’s quite challenging, if not impossible, to change data source settings in Power BI Desktop without triggering a refresh, especially with Python scripts involved.

    Workarounds to Try:
    Parameterize the Server: Set up parameters for your SQL server connection in Power BI Service. Publish the report as-is (with the old SQL settings), then update the server location in Power BI Service under Settings > Datasets > Parameters. Note, though, that applying parameters in Desktop may still prompt a refresh.

    Remove Python Temporarily: As a last resort, create a version of the report without Python scripts. This will allow you to update the data sources, then re-add the Python scripts after publishing.

    In short, Power BI doesn’t natively support changing data sources without some refresh initiation.

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.