Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
tvinko
Frequent Visitor

Processing model from code

Hi all,

 

I created dataset on PPU workspace that contains deployed model with on-premise sources (model is deployed through C#  code, using TOM library).
Deploy went well, but I'm having problems with processing datasource.
I cannot find a way to create connection string to on-premise source.


Meanwhile, I created second model with the same on-premise datasource with PowerBI client and published on the PPU workspace.
when I click on Connection->Script Connection as-> Create To from SSMS, I get following script

 

 

 

{
"create": {
"parentObject": {
"database": "test_delete"
},
"dataSource": {
"name": "ea2de3af-dbac-44d4-bddc-52df729c086b",
"connectionString": "Provider=Microsoft.PowerBI.OleDb;Global Pipe=f26e04ac-4669-496b-b3a4-f313fe673cd1;Mashup=\"VERY_LONG_STRING\";Location=\"dim CustomerView\"",
"impersonationMode": "impersonateCurrentUser"
}
}
}

 

 


How can I connect to this datasource with my code?

I cannot find a way to create conenction string properly because I'm not familiar with "Global Pipe" and Mashup variables,
which PBI construct automatically.

I also checked PowerBI Api's (https://api.powerbi.com/v1.0/myorg/) on how to process PBI datasource from code, but cannot find any clue.

 

If I recap:
- I have installed and configured gateway properly
- I can connect to PBI workspace and deploy model from my code
- the problem is when I try to process analysis services from code because it points to on-premise datasource

 

I wonder if there is also another way to process model?

 

Thanks

1 REPLY 1
Anonymous
Not applicable

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.