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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
thomasreick
Resolver I
Resolver I

Mass-Editing of PQ-Script required due to change of Oracle-DB-Scheme

Good Morning,

The situation is as described below.

  • Customer is running ~150 pBI reports, each one containing 1 to N datasources.
  • These sources are imported as a complete view from Oracle into PQ.
  • PQ is writing the server AND the scheme the view had been imported from.
  • Now Customer-IT wants to replace the existing scheme with a different scheme name for all the views, thus affecting all reports and make them crash.

To avoid manual editing scheme-name of all PQ-Scripts I am looking for a smarter approach.

 

My Questions:

Is there a smart way to search and replace parts of PowerQuery-M-Code via a script?

Has anyone been confronted with a situation like this and how was it resolved.

Can you please share your expirience

Thanks for input.

Thomas

2 REPLIES 2
Vijay_A_Verma
Super User
Super User

For mass Find/Replace, you can use a third party free tool Power BI SideTools. This leverages Visual Source Code in turn. You can import your pbix file and then after changes export is back.

But it has a learning curve involved. You will have to see the video to learn. Make sure that you have a backup of your original pbix file before practicing on this.

Hi Vijay, thx for your input...

The tool requires to go file-by-file? This is exactly what we are trying to avoid.

Does the tool provide a "batch"-functionality e.g. to perform search&replace or all pbix-files in a directory?

 

Edited: I can see in the video presentation on that page that multiple files can be serched for DAX-Code but have not found yet a search functionality on M-Code

 

pls comment

Thx

Thomas

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors