Press "Enter" to skip to content

Moving Dataflows Between Workspaces

Marc Lelijveld (along with Ton Swart) shows how to move dataflows from one workspace to another:

Now, here it starts to become interesting. Let’s try to automate the manual steps to an automated process. To automate task in the Power BI service, we have to “talk” to the Power BI REST API. The Power BI REST API provides programmatic access to the report server catalog. For example, basic CRUD (Create, Read, Update and Delete) operations can be done on folders, reports, KPIs, data sources, datasets, refresh plans, subscriptions, etc.

Click through to see how to do it by hand and then how to automate it.

One Comment

  1. Willian Cavalcante
    Willian Cavalcante2019-10-30

    Hello,

    I am trying to run the script to move the data stream but gives the following error:

    Invoke-RestMethod: {“error”: {“code”: “DuplicatePackageNotFoundError”, “pbi.error”: {“code”: “DuplicatePackageNotFoundErr
    or “,” parameters “: {},” details “: []}}}
    At C: \ Users \ williancavalcante \ Downloads \ Power-BI-Automation-master \ Power-BI-Automation-master \ PowerBI_MoveDataflows.p
    s1: 67 char: 17
    + … $ postFlow = Invoke-RestMethod -Uri $ url -ContentType ‘multipart / form- …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
    + CategoryInfo: InvalidOperation: (System.Net.HttpWebRequest: HttpWebRequest) [Invoke-RestMethod], WebE
    xception
    + FullyQualifiedErrorId: WebCmdletWebResponseException, Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Comments are closed.