Forum Discussion

DavidPi's avatar
DavidPi
Advocate II
4 years ago

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