Created
June 23, 2021 01:12
-
-
Save JamesDBartlett3/37b0ae555cf8f92563a92719a556c907 to your computer and use it in GitHub Desktop.
Run this script in Tabular Editor to replace the source Dataflow GUIDs in your Power BI Dataset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This script is used to change the DataflowID & WorkspaceID on all partitions in the model | |
var oldWorkspaceId = ""; | |
var newWorkspaceId = ""; | |
var oldDataflowId = ""; | |
var newDataflowId = ""; | |
// Loop through all partitions on the model, replacing the DataflowIDs & WorkspaceIDs | |
foreach(var p in Model.AllPartitions.OfType<MPartition>()) | |
{ | |
p.Expression = p.Expression | |
.Replace(oldWorkspaceId, newWorkspaceId) | |
.Replace(oldDataflowId, newDataflowId); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment