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.
nathancwatkins
1 year agoHelper II
You can just select all of the queries, Copy them, Paste them into notepad,, Five and replace whatever you're looking for, and then copy and paste back into Power Query.
--Nate