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
Krishanu
Helper I
Helper I

Bulk update datasource type

Hello Experts,
Help Needed!

We have a requirement where we need to repoint many (500+) existing reports from synapse (Azure sql dw) to Snowflake.

Is there any programatic way to do this update in bulk? The Rest api we have seen - https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources-in-group , but this doesn't support changing datasource type.

Any way to do this without making changes individually?

Thanks,

Krishanu

4 REPLIES 4
Krishanu
Helper I
Helper I

@bcdobbsany luck with this please?

Krishanu
Helper I
Helper I

Some more info:
Synapse and Snowflake table/schema structures are same.

The query patterns are following:

Synapse:

let
Source = Sql.Database("Synpase Server", "Synapse Database"),
AdventureWorksDW2017 = Source{[Name="AdventureWorks"]}[Data],
dbo_DimProduct = AdventureWorksDW2017{[Schema="dbo",Item="DimProduct"]}[Data]
in
dbo_DimProduct


Also we have seen this -
let
Source = Sql.Databases("Synpase Server"),
#"dw-prod" = Source{[Name="Synapse Database"]}[Data],
dbo_DimCustomer = #"dw-prod"{[Schema="dbo",Item="DimCustomer"]}[Data]
in
dbo_DimCustomer
----------------------------------------------------------------------------------------------
For Snowflake:

let
Source = Snowflake.Databases("Snowflake Server", "Snowflake Warehouse", null),
Test_Database = Source{[Name="Test",Kind="Database"]}[Data],
IM_Schema = Test_Database{[Name="IM",Kind="Schema"]}[Data],
Test1_Table = IM_Schema{[Name="Test1",Kind="Table"]}[Data],
in
Test1_Table

bcdobbs
Super User
Super User

Few questions:

Does each report have it's own dataset?

Do you premium capacity or ppu?

 

Not sure how easy it is (never tried) but if you have premium you can connect to a workspace via an xlma end point and interact the tabular object model (TOM) with a c# script. You'd have to loop through each workspace/dataset in turn though. 

Have a read of

https://docs.microsoft.com/en-us/analysis-services/tom/tom-pbi-datasets?view=asallproducts-allversio...



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Thanks for replying.
Yes, we have premium and 90-95% of the reports have their own data set, remaining will be over shared dataset.

Anyone has any sample script on this line please?

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.

Top Solution Authors
Top Kudoed Authors