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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DavidPi
Advocate II
Advocate II

New datamarts dataset vs TOM

I have application in C# than use TOM to connect to Power BI workspace and then go through existing datasets and retrieve M Query.

But dataset created automatically from datamarts is not available in TOM collection.

Should I analyse this "new type" of dataset differently? Is it supported by TOM?

 

Thx.

 

David

 

string workspaceConnection = "powerbi://api.powerbi.com/v1.0/myorg/" + workspacename;
string tenantId = _configuration["tenant"];
string appId = _configuration["client_id"];
string appSecret = _configuration["client_secret"];
string connectStringApp = $"DataSource={workspaceConnection};User ID=app:{appId}@{tenantId};Password={appSecret};";

// connect to the Power BI workspace referenced in connect string
Microsoft.AnalysisServices.Tabular.Server server = new Microsoft.AnalysisServices.Tabular.Server();
server.Connect(connectStringApp);

 

//Database = Datasets -> not see datasets from Datamarts
foreach (Microsoft.AnalysisServices.Tabular.Database db in server.Databases)
{

2 REPLIES 2
DavidPi
Advocate II
Advocate II

I'm sorry but these links describe datamarts from end-users perspecive not developers.

I have also tried REST API and get unnamed dataflow from workspace with datamart.

But when I tried to get dataflow json I got error reponse.

 

{
"error": {
"code": "InvalidRequest",
"message": "Unexpected dataflow error: "
}
}

 

For "standard" dataflow, the response is ok.

 

https://api.powerbi.com/v1.0/myorg/groups/....../dataflows

https://api.powerbi.com/v1.0/myorg/groups/..../dataflows/...

Anonymous
Not applicable

Hi @DavidPi ,

Please review the following links and check if it can help you...

Power BI Datamart

Get started with datamarts

Best Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.