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
saber35
Frequent Visitor

How to set ProviderDataSource for on-premises SQL Server datasources?

Hi all,

 

I have published a pbix (lets say it sample.pbix) with complete working dataset model (tables and all relationship).  This pbix has an on-premises SQL Server datasource, so I can see "Gateway connection" and "Data source credentials" from the menu "Settings" of the dataset.  I can refresh the data manually from Power BI Service (app.powerbi.com) or even SSMS (SQL Server Management Studio).  

 

Then, my objective is I want to add partition dynamically, each month.  So I need to add Table.Partition and its data source programmatically using Table Object Models library.  Refer to docs, I already success connected to my sample dataset, and there should be Model.Datasources property so I can reuse it for the new partition.  But I found it empty (for on-premises case).  So how do I add new table partition?  I have tried add partition without set its Source (using class QueryPartitionSource), but still got no luck.

 

Thanks in advance.

1 ACCEPTED SOLUTION
saber35
Frequent Visitor

Case closed.

 

For on-premises datasource, build partition using MPartitionSource instead QueryPartitionSource as exemplified by this sample.

 

Thanks all.

View solution in original post

1 REPLY 1
saber35
Frequent Visitor

Case closed.

 

For on-premises datasource, build partition using MPartitionSource instead QueryPartitionSource as exemplified by this sample.

 

Thanks all.

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.