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
Anonymous
Not applicable

How to copy dataset using PowerShell Script

Hi Team,

 

We are stuck in the below scenario, need to copy Report with Dataset from One workspace to Another.

 

We have tried below method but it works only if the Dataset already exists in Destination Workspace

 

1) Copy-PowerBIReport 

Copy-PowerBIReport -Name "Report_Copy_5" -Id $source_report_id -WorkspaceId $source_WorkspaceId -TargetWorkspaceId $target_WorkspaceId -TargetDatasetId $targetDatasetId

2) Export & Import option in Power BI API

  1. Export report in Group
    1. groupId -> Workspace Id
    2. reportId -> Report Id
  2. Import-Get Import in Group
    1. groupId -> Workspace Id
    2. importId -> This Import Id is not clear from where we get

Note: First Export report is not working as don't know how to store the PBIX output, second Import option won't work without importId which don't know from where to pass.

 

3) Clone report In Group

  1. groupId - > Workspace Id
  2. reportId - > Report Id
  3. Request Body
    1. targetModelId-> Target dataset id which assumes like dataset id available in Destination Workspace
    2. targetWorkspaceId -> Target Workspace id

Note: this clone report clone the report every time on the same Workspace

 

Requesting you to provide proper guidance on how to accomplish the task, please share the PowerShell code.

 

Thanks in advance,

Santosh Sawant 

0 REPLIES 0

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.