Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
lojith
Frequent Visitor

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"

 

lojith_0-1729875970985.png

 

2 ACCEPTED SOLUTIONS
AmiraBedh
Most Valuable Professional
Most Valuable Professional

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.

 

 

 

 

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

View solution in original post

v-xiaocliu-msft
Community Support
Community Support

Hi @lojith ,

 

Please convert the single column table to a list.

vxiaocliumsft_0-1730344529111.png

 

Best Regards,

Wearsky

View solution in original post

6 REPLIES 6
v-xiaocliu-msft
Community Support
Community Support

Hi @lojith ,

 

Please convert the single column table to a list.

vxiaocliumsft_0-1730344529111.png

 

Best Regards,

Wearsky

AmiraBedh
Most Valuable Professional
Most Valuable Professional

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.

 

 

 

 

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

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.

 

lojith_0-1730111404386.png

 

lojith
Frequent Visitor

Hi @AmiraBedh -  could you please guide me further here?

AmiraBedh
Most Valuable Professional
Most Valuable Professional

Have you try converting the column to a list ?


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Sorry for the late reply as I was Out of Office. Yes, I tried converting to list and was able to select the parameter file. But the next problem is it is expecting to provide a current value. I have provided a Server Name.

lojith_0-1730712622531.png

 

In the parameter flat fle, I have given a different server name. But the parameter is not taking the new value, it still uses the initial value given in Current Value. Is there a way to update the Current value with the value provided in the flat file?

lojith_1-1730712782869.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.