Forum Discussion
Gasho
1 year agoRegular Visitor
How to update all Queries in Power Query Editor
In Power Query Editor, I have bunch of Queries/Views under Queries [10] that I would like to modify with one shot to replace schema 01 with schema 02 under Naviagation I created Parameter BAORAO02_...
- 1 year ago
You can create a Parameter for Schema Name
Name: SchemaName
Value: "BAORAO02_Silo2" (or any other schema name)Or you can create a Central Function to Retrieve the Schema
Go to Power Query Editor → New Query → Blank Query
Open Advanced Editor and paste:
(schemaName as text) =>
let
Source = Odbc.DataSource("dsn=ABC112", [HierarchicalNavigation=true]),
ABC112_Database = Source{[Name="ABC112",Kind="Database"]}[Data],
Selected_Schema = ABC112_Database{[Name=schemaName,Kind="Schema"]}[Data]
in
Selected_Schema
Rename this query to GetSchema.
lbendlin
1 year agoSuper User
The correct way is to use parameters for that.
The McGyver way is to copy all queries, paste them into Notepad++ or better, mass replace the value, then delete them in Power Query and paste them back from the editor.