Forum Discussion

lojith's avatar
lojith
Frequent Visitor
1 year ago
Solved

Pass Oracle Server Name from flat file to Power BI

Hi - I am connecting Power BI to Oracle DB. I would like to pass the DB name from flat file to Power BO so that users can change the server name in flat file and run in different Oracle servers without having to manually change in Pbix file.

Could anyone guide me on how to achieve this? Tried to use Query but did not work out. 

Instead of Server Name, it should be able to pass Server_Name from say "C:\Users\User1\DB_Parameter.txt"

 

 

  • You can achieve that using parameters. In Power BI, go to Home > Get Data > Text/CSV.

     

    • Select your file (DB_Parameter.txt) and load it into Power BI.
    • This will import the file content as a single-column table.

    Then :

     

    • In Transform Data, go to Manage Parameters > New Parameter.
    • Name the parameter ServerName.
    • Set the Type to Text.
    • Under Current Value, use Data Source Settings to dynamically reference the column with the server name by selecting the column name from the DB_Parameter.txt file.

     

    Then go back to Home tab, go to Get Data > Oracle Database.

    When setting up the connection, instead of entering the server name directly, enter the parameter you just created.

     

     

     

     

     

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi lojith ,

     

    Please convert the single column table to a list.

     

    Best Regards,

    Wearsky

6 Replies

  • You can achieve that using parameters. In Power BI, go to Home > Get Data > Text/CSV.

     

    • Select your file (DB_Parameter.txt) and load it into Power BI.
    • This will import the file content as a single-column table.

    Then :

     

    • In Transform Data, go to Manage Parameters > New Parameter.
    • Name the parameter ServerName.
    • Set the Type to Text.
    • Under Current Value, use Data Source Settings to dynamically reference the column with the server name by selecting the column name from the DB_Parameter.txt file.

     

    Then go back to Home tab, go to Get Data > Oracle Database.

    When setting up the connection, instead of entering the server name directly, enter the parameter you just created.

     

     

     

     

     

    • lojith's avatar
      lojith
      Frequent Visitor

      Thanks AmiraBedh for your response. I have followed the steps you have mentioned. Imported the file. In the New Parameter window, unable to reference the column from the imported table. The Query option is coming as disabled. How can I dynamicallly reference the Servername vlaue nder Current Value? Am i missing something? Thanks.

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi lojith ,

     

    Please convert the single column table to a list.

     

    Best Regards,

    Wearsky