Forum Discussion

markmsc's avatar
markmsc
Resolver I
6 months ago
Solved

Remove existing datasource - 2026 edition

Collegues - I am having an issue that I see referenced in threads like this one from as far back as 2015.  

 

In sum: I have a semantic model that I want to migrate from one database to a matching twin elsewhere.  In Desktop, this is simple: Transform Data > Change Data Source.  As described in the linked thread, the issue arises when I publish this new model with the new datasource to Power BI: the service can't refresh it because, in addition to the new datasource, the old one is still attached to the model.

 

As it was a decade ago, I think we still cannot remove a datasource from a model within the service.  And I have tried every Desktop suggestion made in the linked thread and none of them have worked for me, including the ones marked as a solution.  It shouldn't be this hard (nor hard at all) to simply migrate a model?

 

I'm hoping that there exists a more recent solution that I've not yet turned up to solve this problem, and that one of you will know it.

 

Thank you.

  • Hello Irwan - thank you very much for your reply.

     

    I solved my issue right about at the same time you were replying to me.  As it turns out, it was one of the solutions from the older post, but I did not realize it earlier.

     

    The model in question has a mix of tables configured for incremental refresh and those that are not, because they are too small to require that.  When I changed the datasource on migration, and found that both old and new were in the published model, my first thought (which is suggested in that old thread) was that the queries for some tables still had the old source in them.

     

    I looked at a selection of tables in the Query Editor, and found this not to be the case.  Only the new source was in there.  But I didn't inspect every table, and because of this, I did not notice that the QE, for whatever reason, was only showing me the tables that were not configured for IR.  The queries for the IR tables all still had the old source in them, but those tables were not listed in the QE when I did my inspection.

     

    I didn't notice this until I subsequently opened the published model in TE3 and inspected the query sources there.  I updated the connect string for all affected tables in TE3, saved that out to the service, and was good to go from there.

     

    I don't know why Desktop did not update the IR table sources when I changed the datasource in the file, but that is a mystery for another day.

     

    Thank you again for your reply.

     

3 Replies

  • hello markmsc 

     

    i might be misunderstood, but in Power BI Service, i assumed you are doing in workspace then i think it should be possible.

    then you will be directed into another option with open semantic model

    from here, the view will be power query like transform model in power bi desktop.

    change viewing (default) into editing to change any m-code.

     

    Hope this will help.

    Thank you.

    • markmsc's avatar
      markmsc
      Resolver I

      Hello Irwan - thank you very much for your reply.

       

      I solved my issue right about at the same time you were replying to me.  As it turns out, it was one of the solutions from the older post, but I did not realize it earlier.

       

      The model in question has a mix of tables configured for incremental refresh and those that are not, because they are too small to require that.  When I changed the datasource on migration, and found that both old and new were in the published model, my first thought (which is suggested in that old thread) was that the queries for some tables still had the old source in them.

       

      I looked at a selection of tables in the Query Editor, and found this not to be the case.  Only the new source was in there.  But I didn't inspect every table, and because of this, I did not notice that the QE, for whatever reason, was only showing me the tables that were not configured for IR.  The queries for the IR tables all still had the old source in them, but those tables were not listed in the QE when I did my inspection.

       

      I didn't notice this until I subsequently opened the published model in TE3 and inspected the query sources there.  I updated the connect string for all affected tables in TE3, saved that out to the service, and was good to go from there.

       

      I don't know why Desktop did not update the IR table sources when I changed the datasource in the file, but that is a mystery for another day.

       

      Thank you again for your reply.

       

  • Hi markmsc ,

    The main reason for the issue might be that some tables or objects are still using the old source.

    1) Please open the semantic model in the service, click on "View Item Lineage," and check where the old source is still appearing.



    2) You can check the semantic model settings to see if the old source is still listed.
    3) Connect your semantic model using the tabular editor, where you can also find the source dependency.


    Thanks

    If this response was helpful in any way, I’d gladly accept a kudo.
    Please mark it as the correct solution. It helps other community members find their way faster