Forum Discussion

ArunK's avatar
ArunK
New Member
1 year ago

Add data source parameter to a live data connection.

Hi, 

 

I have a fully fledged pbi report with multiple pages and measures.This report is pointing to snowflake preprod and I want to change the datasource to snowflake prod.(There is no semantic model for prod).

Can I do this with my report unaffected?

 

Thank in advance.

8 Replies

  • ArunK what it is pointing to? It is not clear. is it pointing to a semantic model on pre-prod or some backend pre-prod data source? Provide more clarity, please.

    • ArunK's avatar
      ArunK
      New Member

      Hi,

       

      Sorry, its pointing to tables in Snowflake preprod right now and is published in workspace. I want the same to point to snowflake prod. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi ArunK 

     

    Please try this:

    First of all, open the Data source settings in the Home pane to see the current data source.

    Then select Data source in current file, and select your snowflake preprod and click Change Source to change it to snowflake prod.

     

     

    Best Regards

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

    • ArunK's avatar
      ArunK
      New Member

      I tried this method, the isssue is its showing other semantic models which are existing in the pbi workspace. I dont have the required semantic model existing anywhere and the data need to be taken from snowflake prod schema.

  • ArunK I would recommend adding a parameter for the connection string and once it is published to the service you can easily switch between production and non-production environment. This is the way to go if you want to have a scalable solution.

    • ArunK's avatar
      ArunK
      New Member

      Could you please show me how this can be done? I think the parameter addition is greyed out or not possible in live connection.

  • ArunK You have to add a parameter in PQ and replace the live connection string with the parameter.

     

    Let's assume, you have a IP address and database name for the connection (I don't use Snowflake so not sure what included in the parameter).

     

    Given above example, I will create 2 parameter, one for IP and other for db name, and in the table where fixed value of the IP and db name is given, replace that with the parameter value.

     

    Now as you change the parameter value it will change the connection string for the table and everything should work.

    • ArunK's avatar
      ArunK
      New Member

      Power Query editor is not available in live connection which is preventing the parameter creation.